hclust(dist, method = "compact", sim =)
In hierarchical cluster displays, a decision is needed at each merge to specify which subtree should go on the left and which on the right. Since, for n individuals, there are n-1 merges, there are 2^(n-1) possible orderings for the leaves in a cluster tree. The default algorithm in hclust is to order the subtrees so that the tighter cluster is on the left (the last merge of the left subtree is at a lower value than the last merge of the right subtree). Individuals are the tightest clusters possible, and merges involving two individuals place them in order by their observation number.
By changing the distance metric and the clustering method, several different cluster trees can be created from a single dataset. No one method seems to be useful in all situations. Single linkage ("connected") can work poorly if two distinct groups have a few "stragglers" between them.
Hartigan, J. A. (1975). Clustering Algorithms. Wiley. New York.
Many multivariate statistics books also include a discussion on clustering.
# create a sample object using a built-in dataset x <- longley.y h <- hclust(dist(x)) plclust(h)hclust(dist(x, metric="maximum"), "ave")
votes.clust <- hclust(dist(votes.repub), "ave") plclust(votes.clust, label=state.abb)