Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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('ML','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. 'ML' = maximum likelihood method; 'pic' = independent contrasts method. pic option can be used when ML 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.

Author(s)

David Ackerly <dackerly@berkeley.edu>

References

Ackerly, D. D. 2009. Conservatism and diversification of plant functional traits: Evolutionary rates versus phylogenetic signal. Proceedings of the National Academy of Sciences USA 106:19699-19706. doi: 10.1073/pnas.0901635106.

Evans, M. E. K., S. A. Smith, R. S. Flynn, and M. J. Donoghue. 2009. Climate, Niche Evolution, and Diversification of the "bird-cage" Evening Primroses (Oenothera, Sections Anogra and Kleinia). American Naturalist 173:225-240.

Examples

randtree <- rcoal(20)
randtraits <- rTraitCont(randtree)
traitgram(randtraits,randtree)
traitgram(randtraits,randtree,method='pic')

picante

Integrating Phylogenies and Ecology

v1.8.2
GPL-2
Authors
Steven W. Kembel <steve.kembel@gmail.com>, David D. Ackerly <dackerly@berkeley.edu>, Simon P. Blomberg <s.blomberg1@uq.edu.au>, Will K. Cornwell <cornwell@zoology.ubc.ca>, Peter D. Cowan <pdc@berkeley.edu>, Matthew R. Helmus <mrhelmus@wisc.edu>, Helene Morlon <morlon.helene@gmail.com>, Campbell O. Webb <cwebb@oeb.harvard.edu>
Initial release
2020-06-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.