DendextendRcpp
Faster manipulation of dendrogram objects in R.
Install / Use
/learn @talgalili/DendextendRcppREADME
dendextendRcpp
Introduction
A dendrogram object in R are is a list structure with attributes in its nodes and leaves.
Motivation
Working with dendrogram objects often require a function to recursively go through all (or most) element in the list object. Naturally, such function are rather slow in R, but can become much faster thank to Rcpp.
This package offers faster manipulation of dendrogram objects in R.
Installation
To install the stable version on CRAN:
install.packages('dendextendRcpp')
To install the cutting-edge GitHub version:
if (!require('devtools')) install.packages('devtools');
devtools::install_github('talgalili/dendextendRcpp')
Usage
library(dendextendRcpp)
hc <- hclust(dist(USArrests))
dend <- as.dendrogram(hc)
labels(dend)
require(microbenchmark)
microbenchmark(stats_labels.dendrogram(dend),
dendextendRcpp::dendextendRcpp_labels.dendrogram(dend),
times = 100)
# about 10-30 times faster. It is faster the larger the tree is.
Contact
You are welcome to:
- submit suggestions and bug-reports at: https://github.com/talgalili/dendextendRcpp/issues
- send a pull request on: https://github.com/talgalili/dendextendRcpp/
- compose a friendly e-mail to: tal.galili@math.tau.ac.il
Available functions
- dendextendRcpp_labels.dendrogram
- cut_lower_fun
- get_branches_heights
- heights_per_k.dendrogram
MORE INFORMATION
Visit the Rcpp project!
- http://www.rcpp.org/
- http://gallery.rcpp.org/
- http://cran.r-project.org/web/packages/Rcpp/index.html
- http://dirk.eddelbuettel.com/code/rcpp.html
- http://blog.r-enthusiasts.com/tag/rcpp/
Code of conduct
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Related Skills
node-connect
335.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
335.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
82.7kCommit, push, and open a PR

