order.dendrogram
ID Numbers or Labels of the Leaves in a Dendrogram

Description

Returns the ID number or the labels of the leaves in a dendrogram, in the order in which they are found.

Usage

order.dendrogram(x)
## S3 method for class 'dendrogram':
labels(x)

Arguments

x an object of class "dendrogram", as produced by as.dendrogram.

Details

order.dendrogram is not a method for the generic order function. Its argument list differs and it does not always return a permutation of seq_along(labels(x)).
Value
order.dendrogramreturns a vector of leaf ID numbers. The vector length is the number of leaves in the dendrogram.
labels.dendrogramreturns a vector of leaf "labels" attributes. The vector length is the number of leaves in the dendrogram.
See Also
reorder.dendrogram, as.dendrogram
Examples
hc <- hclust(dist(c(First = 0.5, Second=1, Third=2, Fourth=6, Fifth=7)))
dendr <- as.dendrogram(hc)
labels(dendr)
order.dendrogram(dendr)
str(cut(dendr, 1.2)$lower[[1]])
order.dendrogram(cut(dendr, 1.2)$lower[[1]])
Package stats version 6.1.4-13
Package Index