Learn R Programming

picante (version 0.7-1)

traitgram: Draw phylogeny with nodes at trait positions

Description

Draws a phylogeny where x position of nodes and tips corresponds to value of a continuous trait variable, and y position corresponds to node depth (i.e. age).

Usage

traitgram(x, phy, xaxt = 's', underscore = FALSE, show.names = TRUE,
            show.xaxis.values = TRUE, method = c('ace','pic'), ...)

Arguments

x
Trait vector (same order as phy$tip.label, or with taxon names in names)
phy
phylo object
xaxt
x axis default type
underscore
if FALSE remove underscore from taxonomic names
show.names
if TRUE show taxon names across tips of phylogeny
show.xaxis.values
if TRUE show values for trait on x=axis
method
method for calculation of internal trait values. 'ace' = ace maximum likelihood method from ape; 'pic' = independent contrasts method. pic option can be used when ace fails to converge or otherwise seems to fail to correctly reconstruct ancestral values
...
Additional arguments passed to plot

Value

  • Plots a traitgram, no values returned.

See Also

pic3

Examples

Run this code
randtree <- rcoal(20)
randtraits <- evolve.brownian(randtree)
traitgram(randtraits,randtree)
traitgram(randtraits,randtree,method='pic')

Run the code above in your browser using DataLab