plotRates: Plot RRphylo rates at a specified node

Description Usage Arguments Value See Also Examples

View source: R/plotRates.R

Description

The function plotRates plots the RRphylo rates computed for a given clade as compared to the rates computed for the rest of the tree.

Usage

1
plotRates(RR,node,export.tiff =FALSE,foldername=NULL,filename=NULL)

Arguments

RR

an object produced by RRphylo.

node

the node subtending the clade of interest.

export.tiff

if TRUE the function save a "rate_bars.tiff" file inside the working directory. It is TRUE by default.

foldername

has been deprecated; please see the argument filename instead.

filename

a character indicating the name of the tiff file and the path where it is to be saved. If no path is indicated the file is stored in the working directory.

Value

The function produces two barplots. On the left side, the rates (in absolute values) computed for the focal clade (blue) are plotted against the rates of the rest of the tree (green). On the right side, the absolute rates of individual branches of the focal clade are collated in increasing rate value (blue bars), and contrasted to the average rate computed over the rest of the tree branches (the vertical red line). It also returns the rate values for both nodes and species descending from the focal node.

See Also

RRphylo vignette

Examples

1
2
3
4
5
6
7
8
data("DataApes")
DataApes$PCstage->PCstage
DataApes$Tstage->Tstage
cc<- 2/parallel::detectCores()

RRphylo(tree=Tstage,y=PCstage,clus=cc)->RR

plotRates(RR,node=72,export.tiff = FALSE)

pasraia/RRphylo documentation built on Aug. 6, 2021, 9:42 p.m.