prune.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.
prune.clust (cluster, k=NULL, h=NULL)
cluster |
object of class "hclust" or "twins" . |
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 (mva) data (hex.spp) draw.clust (prune.clust (hclust (dist (hex.spp)), k=6))