get_cut_from_merge_id | R Documentation |
This function expects a set of node id's of a hierarchical clustering object that would define a partition of the leaves. It returns a vector giving the implied clustering of the leaves (analogous to the output of 'stats::cutree').
get_cut_from_merge_id(hc, merge_id)
hc |
An object of class 'hclust' |
merge_id |
A numeric vector. Indexing of nodes should match that of the 'merge' matrix in an 'hclust' object. In particular, positive numbers specify interior nodes and negative numbers specify leaves. These nodes must define a partition of the leaves, meaning no node in 'merge_id' should be a descendant of another and every leaf should either be included directly or be the descendant of one of the interior nodes referenced by 'merge_id'. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.