getBinarySubTree: Get the left or right subtree of a given hierarchical...

getBinarySubTreeR Documentation

Get the left or right subtree of a given hierarchical clustering.

Description

Reads a hierarchical clustering and returns the left or right child of the root node.

Usage

getBinarySubTree(tree, right = FALSE)

Arguments

tree

An hclust object

right

If TRUE, return the right subtree, i.e. the right child of the root node.

Value

The subtree as an hclust object.

Author(s)

Johannes Freudenberg, Xiangdong Liu, Mario Medvedovic

See Also

hclust

Examples

hc <- hclust(dist(matrix(1:20,5)))
hc$labels <- 1:5
plot(hc)
hc.sub <- getBinarySubTree(hc, TRUE)
plot(hc.sub)

uc-bd2k/CLEAN documentation built on Sept. 22, 2022, 4:12 a.m.