labclust(x, y, labels = <<see below>>)
plclust.
Missing values (
NAs) are allowed.
labels
is a character vector, it is used to label the leaves.
Otherwise it is interpreted as a logical flag (in
particular, the value
FALSE suppresses any labeling of
leaves, as is appropriate with large trees).
The horizontal distance between leaves is
1, and the left-most leaf has
"x" coordinate
1, the fifth from the left has coordinate
5, etc.
# create a sample object using built-in dataset x <- hclust(dist(longley.y)) xy <- plclust(x, plot = FALSE) # save coords of tree plclust(x, label = FALSE) # plot it labclust(xy) # now label it with the object number # can use a character vector of names to label the leaves listnames <- names(longley.y) plclust(x, label = FALSE) # plot it labclust(xy, labels=listnames) # vector is called "listnames"