[R] help with hclust and cutree

Madeleine Seeland madeleine.seeland at in.tum.de
Tue Sep 13 16:25:04 CEST 2011


Hello,

I would like to cut a hclust tree into several groups at a specific
similarity. I assume this can be achieved by specifying the "h" argument
with the specified similarity, e.g.:

clust<-hclust(dist,"average")
cut<-cutree(clust,h=0.65)

Now, I would like to draw rectangles around the branches of the
dendrogram highlighting the corresponding clusters, as is done by the
function rect.hclust(). How can I achieve this with the ouput of cutree?

I would appreciate your help!

Best regards,
Madeleine



More information about the R-help mailing list