group.clust {maptree} | R Documentation |
Alternative to cutree
that orders pruned groups from left to
right in draw order, and adds group membership of
observations to pts matrix if provided.
group.clust (cluster, k=NULL, h=NULL, pts=NULL)
cluster |
object of class "hclust" or "twins" . |
k |
desired number of groups. |
h |
height at which to prune for grouping. |
pts |
vector, matrix, or data frame of length or nrow equal to
length(cluster[["order"]]) to which group vector is
joined with cbind. |
At least one of k or h must be specified; k takes precedence
if both are given.
Normally used with map.groups
. See example.
Vector of pruned cluster membership or the cbind of pts and this vector if pts != NULL.
Denis White, white.denis@epa.gov
hclust
,
twins.object
,
cutree
,
map.groups
library (mva) data (hex.spp, hex.env, oregon) map.groups (group.clust (hclust (dist (hex.spp)), k=6, pts=hex.env), lns=oregon)