R: For each node (subtree) of the hierarchical tree forms two...

testBar {ReorderCluster} | R Documentation

## For each node (subtree) of the hierarchical tree forms two vectors, consisting of elements of its left and write subtrees.

### Description

This is the auxiliary function of the package. It makes the lists of two vector, consisting of elements of left and write subtrees for each node of the hierarchical tree. These lists are used in reordering algorithm `OrderingJoseph`, so that it makes easy to define the first(leftmost) and last(rightmost) element of each subtree.

### Usage

    testBar(hc)

### Arguments

`hc` | An object of class hclust which describes the tree produced by the clustering process.There are such components: merge, height, order, labels,call,method,dist.method.

### Details

For each node or subtree of the hierarchical clustering result the function forms the list of two vector, consisting of elements of its left and write subtrees. These lists are used in reordering algorithm `OrderingJoseph`, so that it makes easy to define the first(leftmost) and last(rightmost) element of each subtree, and also to determine the intermediate elements in the process of searching the best ordering for each particular subtree.

### Value

`node` | a list of lists of length n-1, where each single list stores two vectors, consisting of elements of the left and right subtrees of the corresponding node in the merging matrix `hc`

### Author(s)

Natalia Novoselova,Frank Klawonn,Junxi wang

Maintainer: Natalia Novoselova <novos65@mail.ru>

### References

Z. Bar-Joseph, D.K. Gifford, and T.S. Jaakkola. Fast optimal leaf ordering for hierarchical clustering. Bioinformatics, 17:22-29, 2001.

### See Also

`CalcMerge`, `SubTree`

### Examples

    data(leukemia)
    rownames(leukemia)=leukemia[,1]
    leukemia=leukemia[,-1]
    matr=leukemia[,-101]
    class=leukemia[,101]

    matr=as.matrix(matr)
    dist=dist(matr)
    hc <- hclust(dist)
    node=testBar(hc)

[Package ReorderCluster version 2.0 Index]