Last chance! 50% off unlimited learning
Sale ends in
Description: find the names of all items comprising one or more branches of a hierarchical tree.
LeafContent(myinput, mynode=NA)
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.
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.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab