clip.clust {maptree} | R Documentation |
Reduces a hierarchical cluster tree to a smaller tree either by pruning until a given number of observation groups remain, or by pruning tree splits below a given height.
clip.clust (cluster, data=NULL, k=NULL, h=NULL)
cluster |
object of class hclust or twins . |
data |
clustered dataset for hclust application. |
k |
desired number of groups. |
h |
height at which to prune for grouping. |
At least one of k
or h
must be specified; k
takes
precedence if both are given.
Used with draw.clust
. See example.
Pruned cluster object of class hclust
.
Denis White, white.denis@epa.gov
hclust
,
twins.object
,
cutree
,
draw.clust
library (cluster) data (oregon.bird.dist) draw.clust (clip.clust (agnes (oregon.bird.dist), k=6))