clip.clust: Prunes a Hierarchical Cluster Tree

clip.clustR Documentation

Prunes a Hierarchical Cluster Tree

Description

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.

Usage

  clip.clust (cluster, data=NULL, k=NULL, h=NULL)

Arguments

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.

Details

Used with draw.clust. See example.

Value

Pruned cluster object of class hclust.

Author(s)

Denis White

See Also

hclust, twins.object, cutree, draw.clust

Examples

  library (cluster)
  data (oregon.bird.dist)

  draw.clust (clip.clust (agnes (oregon.bird.dist), k=6))

maptree documentation built on April 6, 2022, 5:09 p.m.

Related to clip.clust in maptree...