plot.best {TBEST} | R Documentation |
Plot a dendrogam of a hierarchical cluster with branches labeled by their numbers and significance estimates of tightness.
Description
Description: A plot method for the class best
.
Usage
## S3 method for class 'best'
plot(x,mystat="fldc",siglevel=0.05,sigtype=c("raw","corrected","fdr"),
partition=NA,print.num=TRUE,print.lab=TRUE,float=0.01,col.best=c(2,3),
cex.best=0.8,cex.leaf=0.8,font.best=NULL,main=NULL,sub=NULL,xlab=NULL,
metric.args=list(),...)
Arguments
x |
An object of class |
mystat |
A measure of tightness for which p-values are to be shown in the plot. Default is |
siglevel |
A threshold level of significance for tightness of branches used when |
sigtype |
A character string specifying how the significance threshold |
partition |
An object of class |
print.num |
Logical. If true, the branch numbers will be indicated. |
print.lab |
Logical. If true, the labels will be displayed at the bottom of dendrogram. |
float |
A numeric value that can change the vertical location of pvalues. |
col.best |
A character vector of length 2, indicating the colors to be used for the p-values and for the numbers of the nodes. |
cex.best |
A numeric value for the text size of the branch labels. |
cex.leaf |
A numeric value for the text size of the leaf labels. |
font.best |
An integer which specifies font choice of text on the plot. See |
main |
A character string specifying the title of the plot. |
sub |
A character string specifying a subtitle of the plot. |
xlab |
A caracter string specifying the label of horizontal axis. |
metric.args |
Additional argument from user supplied dissimilariity(distance) function. See |
... |
Further arguments to be passed on to the |
Details
The function plots a dendrogram of the hierarchical tree as specified by the x
argument, an object of class "best"
. When argument partition
is set to an object of class "partition"
, and a partition does exist (see partition
for description), this plot provides the significance estimates for the nodes that form the partition. Otherwise, this function puts legends on all tight nodes with significance estimates no more than siglevel
. To obtain the leaves descending from a given node, refer to function LeafContent
.
Value
A plot with all branch numbers and significant pvalues in the hierarchical tree.
Author(s)
Guoli Sun, Alex Krasnitz
See Also
SigTree
, PartitionTree
,best
,partition
Examples
## Not run:
data(leukemia)
mytable<-SigTree(data.matrix(leukemia),mystat="all",
mymethod="ward",mymetric="euclidean",rand.fun="shuffle.column",
distrib="Rparallel",njobs=2,Ptail=TRUE,tailmethod="ML")
plot(x=mytable,mystat="fldc",siglevel=0.001,sigtype="raw",hang=-1)
mypartition<-PartitionTree(x=mytable,siglevel=0.001,statname="fldc",
sigtype="raw")
plot(x=mytable,mystat="fldc",partition=mypartition)
plot(x=mytable,mystat="fldc",partition=mypartition,print.num=F)
#with user-defined functions
mydist<-function(x,y){return(dist(x)/y)}
myrand<-function(x,z){return(apply(x+z,2,sample))}
mytable<-SigTree(data.matrix(leukemia),mystat="fldc",
mymethod="ward",mymetric="mydist",rand.fun="myrand",
distrib="Rparallel",njobs=2,Ptail=TRUE,tailmethod="MOM",metric.args=list(3),
rand.args=list(2))
plot(mytable,metric.args=list(3))
plot(mytable,metric.args=list(3),cex.leaf=1.5)
## End(Not run)