hclust.
plclust(tree, hang = .1, unit = F, level = F, hmin = 0,
square = T, labels = <<see below>>, plot = T)
hclust.
--1 will cause all individuals to start at y-value
0.
TRUE, the heights of the merges will be
ignored and instead merge i will occur at height i. Useful
for spreading out the tree to see the sequence of merges.
TRUE, the plotted tree will be "leveled",
where merges in different subtrees are arbitrarily assigned
the same height in order to compress the vertical scale.
This is useful with
unit=TRUE.
TRUE, the tree is plotted with
"U" shaped branches, if
FALSE, it has "V" shaped branches.
labels=FALSE.
TRUE, plotting takes place. If
FALSE,
no plotting is done but a value is returned.
plot is
FALSE, a list containing the coordinates
of the leaves of the tree and the interior nodes of the
tree:
x[i],y[i]
gives the coordinates of the leaf corresponding
to the
ith individual.
xn[i],yn[i]
gives the coordinates of the node
representing the
ith merge.
plot is
TRUE, a clustering tree is plotted on the current graphics
device.
Creates a plot of a clustering tree given a structure by the function
hclust
. Can produce a plot of a clustering tree on the current
graphics device, or a list containing the coordinates of the leaves of
the tree and the interior nodes of the tree.
# Create sample object using built-in data
distances <- dist(votes.repub)
plclust(hclust(distances))
# Another example
hc <- hclust(dist(longley.y))
# plot without labels, save structure
xy <- plclust(hc, label = FALSE)
# allow user to point at leaf and have it identified
identify(xy)
sums <- apply(author.count,1,sum)
adjusted <- sweep(author.count,1,sums,"/")
par(mar=c(18,4,4,1))
plclust(hclust(dist(adjusted)),label=dimnames(author.count)[[1]])
title("Clustering of Books Based on Letter Frequency")