reorder.hclust {seriation} | R Documentation |
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 |
dist |
an object of class |
method |
a character string with the name of the used measure. Available are:
|
... |
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"))