LeafContent {TBEST}R Documentation

Find names of leaves belongigng to given branches of a hierarchical tree

Description

Description: find the names of all items comprising one or more branches of a hierarchical tree.

Usage

LeafContent(myinput, mynode=NA)

Arguments

myinput

An object of class hclust, best or partition.

mynode

An integer vector of the numbers of branches whose leaf content is desired. The hclust convention is used for numbering branches and leaves, i.e., the branch numbers can take any value between (-N) and (N-1) excluding 0, where N is the number of leaves in the tree. A negative value refers to an individual leaf whose number is minus that value. If myinput is of class partition, this argument is ignored. The function lists the leaf content for each of the branches that form the partition.

Value

A list of items, of the same length as mynode. Each item corresponds to a branch listed in myneode and is a character vector containing the names of the leaves in the branch.

Author(s)

Guoli Sun, Alex Krasnitz

Examples

data(leukemia)
hc<-hclust(dist(data.matrix(leukemia)),"ward")
#find the name of leaf 29
LeafContent(hc,mynode=c(-29))
#find the name of leaf 29 and leaves belonging to node 29
LeafContent(hc,mynode=c(-29,29))
## Not run: 
mytable<-SigTree(data.matrix(leukemia),mystat="fldc",
        mymethod="ward",mymetric="euclidean",rand.fun="shuffle.column",
        distrib="Rparallel",njobs=2,Ptail=TRUE,tailmethod="ML")
LeafContent(mytable,mynode=c(-29,29))
mypartition<-PartitionTree(x=mytable,siglevel=0.001,statname="fldc",sigtype="raw")
LeafContent(mypartition)

## End(Not run)

[Package TBEST version 5.2 Index]