Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

labels.hclust

Find labels of hclust object (in dendrogram order)


Description

NB will return labels in dendrogram order, not in the order of the original labels retained in object$labels ususally corresponding to the row or column names of the dist object provided to hclust.

Usage

## S3 method for class 'hclust'
labels(object, ...)

Arguments

object

hclust object from which to extract labels

...

Additional arguments (ignored)

Value

character vector of labels in dendrogram order

Author(s)

jefferis

See Also

Examples

hc <- hclust(dist(USArrests), "ave")
dend <- as.dendrogram(hc)
stopifnot(all.equal(labels(hc),labels(dend)))

dendroextras

Extra Functions to Cut, Label and Colour Dendrogram Clusters

v0.2.3
GPL (>= 2)
Authors
Gregory Jefferis [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.