dend = as.dendrogram(hclust(dist(iris[1:150,-5])))
plot(dend)
get_height(dend)
attributes(dend) <- NULL
Rcpp_get_dend_heights(dend) # knows to through a warning :)
dend = as.dendrogram(hclust(dist(iris[1:150,-5])))
Rcpp_get_dend_heights(dend)
get_branches_heights(dend)
Rcpp_get_dend_heights(dend,T,F)
Rcpp_get_dend_heights(dend,T,F)
# require(dendextend)
Rcpp_get_dend_heights(dend)
dendextendRcpp_get_branches_heights(dend,sort=F)
require(microbenchmark)
microbenchmark(
dendextendRcpp::dendextendRcpp_get_branches_heights(dend),
old_get_branches_heights(dend,sort=F)
)
# Rcpp is about 40-107 times faster!Run the code above in your browser using DataLab