getAllClusters: Generate a list of all possible clusters from a hierarchical...

Description Usage Arguments Value Author(s) See Also Examples

Description

The function take an hclust object and returns a list of all possible clusters of desired minimum to maximum size. Clusters are determined by cutting the tree at a given level and recording the leaf node labels of the resulting subtree(s).

Usage

1
getAllClusters(tree, maxSize = 1000, minSize = 10, clusterList = NULL, k=NULL)

Arguments

tree

a hierarchical clustering (hclust object)

maxSize

maximum cluster size

minSize

minimum cluster size

clusterList

depricated. kept for backward compatibilty.

k

Maximum number of clusters. If specified, the list of clusters will be restricted to the top k clusters within the minSize-maxSize range starting at the root.

Value

A list where each list element is a vector of leaf nodes described by the labels slot of the original tree (hclust object).

Author(s)

Johannes Freudenberg

See Also

hclust

Examples

1
2
3
4
gtr <- hclust(dist(1:10))
gtr$labels <- 1:10
plot(gtr)
getAllClusters(gtr, 10, 2)

uc-bd2k/gimmR documentation built on May 3, 2019, 2:15 p.m.