I plot a dendrogram using the following code:

hc <- hclust(dist(USArrests[1:10,]), "ave")

unlist(as.dendrogram(hc))
 [1]  7  1  8  4  6 10  9  2  3  5

how can I easily flip some leaves so that the unlist results are: 

[1]  7  1  8  4  6 10  9  5 3 2

Thanks a lot!

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to