order.hclust: Ordering of the Leaves in a hclust Dendrogram

View source: R/labels.R

order.hclustR Documentation

Ordering of the Leaves in a hclust Dendrogram

Description

Ordering of the Leaves in a hclust Dendrogram. Like order.dendrogram.

Usage

order.hclust(x, ...)

Arguments

x

ab hclust object a distance matrix.

...

Ignored.

Value

A vector with length equal to the number of leaves in the hclust dendrogram is returned. From r <- order.hclust(), each element is the index into the original data (from which the hclust was computed).

See Also

order.dendrogram

Examples


set.seed(23235)
ss <- sample(1:150, 10)
hc <- iris[ss, -5] %>%
  dist() %>%
  hclust()
# dend <- hc %>% as.dendrogram
order.hclust(hc)

talgalili/dendextend documentation built on Jan. 27, 2024, 7:43 p.m.