dend <- as.dendrogram(hclust(dist(USArrests)))
labels(dend)
require(microbenchmark)
microbenchmark(stats_labels.dendrogram(dend),
dendextendRcpp::labels.dendrogram(dend),
times = 100)
# about 30 times faster. It is faster the larger the tree is.Run the code above in your browser using DataLab