cutree.order: Cut a tree into groups of data in the order of the tree

cutree.orderR Documentation

Cut a tree into groups of data in the order of the tree

Description

Cut a tree (result from hclust) into groups of data. Groups are in the order of the tree leafs.

Usage

cutree.order(tree, k = NULL, h = NULL)

Arguments

tree

an hclust object

k

the desired number of groups

h

height where the tree is to be cut

Note

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.

Author(s)

Romain Francois

Source

http://addictedtor.free.fr/packages/A2R/lastVersion/

See Also

cutree

Examples

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)

larmarange/JLutils documentation built on March 24, 2023, 6:39 a.m.