Reorder Dendrograms using Optimal Leaf Ordering
Reorder method for dendrograms for optimal leaf ordering.
## S3 method for class 'hclust' reorder(x, dist, method = "OLO", ...)
x |
an object of class |
dist |
an object of class |
method |
a character string with the name of the used measure
Available are:
|
... |
further arguments are currently ignored. |
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).
A reordered hclust
object.
Michael Hahsler
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.
## 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"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.