[R] no labels when plotting dendrograms

David Marimont marimont at nxpdata.com
Tue Mar 5 05:00:37 CET 2002

I'd like to be able to cut dendrograms at a height I specify
and then plot the resulting subtrees.  I wanted to use the
dendrogram object for this purpose because there doesn't seem
to be a canned way to cut a hclust object and get a list of
hclust objects, but there is a function (cut) that does that
for dendrograms.  The problem I'm having is that when I plot
a dendrogram, I can't figure out how to add labels to the nodes.
For example, this example from the dendrogram documentation
plots a dendrogram without labels:

     hc <- hclust(dist(USArrests), "ave")
     str(dend1 <- as.dendrogram(hc))
     dend2 <- cut(dend1, h=70)

So... does anyone know how to cut an hclust object and get a
list of hclust objects, or how to plot a dendrogram object with
labels?  Thanks.

   David Marimont
   NXP Data Analysis, Inc.

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list