dendextendRcpp_labels.dendrogram: Find Labels from a dendrogram Object using Rcpp

Description Usage Arguments Value Author(s) Source See Also Examples

Description

Extract the leaves labels from a dendrogram object.

Usage

1

Arguments

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.

Value

A vector of labels from the dendrogram leaves. This is often a character vector, but there are cases it might be integer.

Author(s)

Romain Francois, Dirk Eddelbuettel, Tal Galili

Source

R-devel-mailing list.

See Also

labels, dendrogram

Examples

 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)

talgalili/dendextendRcpp documentation built on May 31, 2019, 2:53 a.m.