cutree.order | R Documentation |
Cut a tree (result from hclust) into groups of data. Groups are in the order of the tree leafs.
cutree.order(tree, k = NULL, h = NULL)
tree |
an |
k |
the desired number of groups |
h |
height where the tree is to be cut |
The A2R package has not been updated since January 2006 and cannot be installed anymore with a recent version of R. It's why this function has been copied here.
Romain Francois
http://addictedtor.free.fr/packages/A2R/lastVersion/
cutree
h77 <- hclust(dist(state.x77))
ct.o <- cutree.order(h77, k = 4)
ct.n <- cutree(h77, k = 4)
plot(h77)
rect.hclust(h77, 4)
cbind(ct.o, ct.n)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.