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

reorder_hclust

Reorder Dendrograms using Optimal Leaf Ordering


Description

Reorder method for dendrograms for optimal leaf ordering.

Usage

## S3 method for class 'hclust'
reorder(x, dist, method = "OLO", ...)

Arguments

x

an object of class hclust.

dist

an object of class dist with dissimilarities between the objects in x.

method

a character string with the name of the used measure Available are: "OLO" (optimal leaf ordering; Bar-Joseph et al., 2001) and "GW" (Gruvaeus and Wainer, 1972).

...

further arguments are currently ignored.

Details

Minimizes the distance between neighboring objects (leaf nodes) in the dendrogram by flipping the order of subtrees. The algorithm by Gruvaeus and Wainer is implemented in package gclus (Hurley 2004).

Value

A reordered hclust object.

Author(s)

Michael Hahsler

References

Bar-Joseph, Z., E. D. Demaine, D. K. Gifford, and T. Jaakkola. (2001): Fast Optimal Leaf Ordering for Hierarchical Clustering. Bioinformatics, 17(1), 22–29.

Gruvaeus, G. and Wainer, H. (1972): Two Additions to Hierarchical Cluster Analysis, British Journal of Mathematical and Statistical Psychology, 25, 200–206.

Hurley, Catherine B. (2004): Clustering Visualizations of Multidimensional Data. Journal of Computational and Graphical Statistics, 13(4), 788–806.

See Also

Examples

## cluster European cities by distance
data("eurodist")
d <- as.dist(eurodist)
hc <- hclust(eurodist)
  
## plot original dendrogram and the reordered dendrograms  
plot(hc)  
plot(reorder(hc, d, method = "GW"))  
plot(reorder(hc, d, method = "OLO"))

seriation

Infrastructure for Ordering Objects Using Seriation

v1.2-9
GPL-3
Authors
Michael Hahsler [aut, cre, cph], Christian Buchta [aut, cph], Kurt Hornik [aut, cph], Fionn Murtagh [ctb, cph], Michael Brusco [ctb, cph], Stephanie Stahl [ctb, cph], Hans-Friedrich Koehn [ctb, cph]
Initial release
2020-09-29

We don't support your browser anymore

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