plotRates | R Documentation |
This function generates customized functions to produce
histograms and lollipop charts of the RRphylo
rates computed
for a given clade as compared to the rates computed for the rest of the
tree.
plotRates(RR,node,export.tiff=NULL,filename=NULL)
RR |
an object produced by |
node |
the node subtending the clade of interest. |
export.tiff |
is deprecated. |
filename |
is deprecated. |
The function returns a list of functions:
$plotHist returns the histograms of rates (in ln absolute
values) computed for the focal clade against rates computed the rest of the
tree. The usage is:
...$plotHist(hist.args=list(col1,col2),legend.args=list())
, where
legend.args
is a list of additional arguments passed to the function
legend
(if = NULL
the legend is not plotted) and
hist.args
is a list of further arguments passed to the function
plot.histogram
. hist.args
default arguments include histogram
colors for background rates (col1
) and rates of the clade under
inspection (col2
).
$plotLollipop returns the lollipop chart of the rates of
individual branches of the focal clade collated in increasing rate value,
and contrasted to the average rate computed over the rest of the tree
branches (the vertical line). The usage is:
...$plotLollipop(lollipop.args=NULL,line.args=NULL)
, where
lollipop.args
is a list of further arguments passed to the function
lollipoPlot
and line.args
is a list of additional
arguments passed to the function line
. This function additionally
returns the vector of rates for the focal clade, collated in increasing
order.
Silvia Castiglione, Pasquale Raia
data("DataApes")
DataApes$PCstage->PCstage
DataApes$Tstage->Tstage
cc<- 2/parallel::detectCores()
RRphylo(tree=Tstage,y=PCstage,clus=cc)->RR
plotRates(RR,node=72)->pR
pR$plotHist(hist.args=list(col1="cyan1",col2="blue"),legend.args=list(x="topright"))
pR$plotLollipop(lollipop.args=list(col="chartreuse",bg="chartreuse"),
line.args=list(col="deeppink",lwd=2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.