nodeDist: Plotting distribution of divergence times of a pair of...

View source: R/nodeDist.R

nodeDistR Documentation

Plotting distribution of divergence times of a pair of species from a set of phylogenetic trees.

Description

Plots the distribution of age estimates of the most recent common ancestor of a specified pair of species across trees (for instance a posterior distribution).

Usage

nodeDist(trees,sp1,sp2,relTime=F,fillcol="blue",xlabel="Age (mya)",main="",add=F,...)

Arguments

trees

An object of class multiPhylo containing a set of time-calibrated trees.

sp1

Name of one of the two species for which the divergence time is of interest.

sp2

Name of the other of the two species for which the divergence time is of interest.

relTime

Logical whether to plot relative (to age of root) divergence times or absolute times (defaults to absolute times).

fillcol

Colour to plot distribution.

xlabel

Label for the x-axis.

main

Title for plot (if desired, defaults to no title).

add

Logical whether to overlay distribution on an existing plot (make sure xlim and ylim on original call are set to accomodate both distributions).

...

Additional arguments to customise output, passed to plot.

Value

Density plot of the distribution of relative or absolute divergence times across trees for the specified pair of species.

Author(s)

Kevin Arbuckle

Examples

## Not run: 
# Density plot of absolute divergence times
nodeDist(trees,"Naja_haje","Naja_nivea")

# Density plot of relative divergence times (root age for each tree set to 1)
nodeDist(trees,"Naja_haje","Naja_nivea",relTime=T,xlabel="Relative time")
## End(Not run)

windex documentation built on Oct. 11, 2023, 5:16 p.m.

Related to nodeDist in windex...