Description Usage Arguments Value Author(s) Source See Also Examples
Extract the leaves labels from a dendrogram object.
1 | dendextendRcpp_labels.dendrogram(object, warn = FALSE, ...)
|
object |
a dendrogram object. |
warn |
logical (FALSE) - should the user be warned if reverting to default? (I set it to FALSE since it can be very noisy sometimes...) |
... |
not used. |
A vector of labels from the dendrogram leaves. This is often a character vector, but there are cases it might be integer.
Romain Francois, Dirk Eddelbuettel, Tal Galili
R-devel-mailing list.
1 2 3 4 5 6 7 8 9 10 11 12 | dend <- as.dendrogram(hclust(dist(USArrests)))
labels(dend)
## Not run:
# require(microbenchmark)
microbenchmark::microbenchmark(dendextendRcpp::stats_labels.dendrogram(dend),
dendextendRcpp::dendextendRcpp_labels.dendrogram(dend),
times = 100)
# about 30 times faster. It is faster the larger the tree is.
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.