Description Usage Arguments Value Author(s) See Also Examples
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).
1 | getAllClusters(tree, maxSize = 1000, minSize = 10, clusterList = NULL, k=NULL)
|
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. |
A list where each list element is a vector of leaf nodes described by the labels slot of the original tree (hclust object).
Johannes Freudenberg
1 2 3 4 | gtr <- hclust(dist(1:10))
gtr$labels <- 1:10
plot(gtr)
getAllClusters(gtr, 10, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.