Learn R Programming

paleotree (version 1.8.2)

plotTraitgram: Plot a Traitgram for Continuous Traits

Description

This function uses maximum-likelihood ancestral trait estimation to plot a 'traitgram' (Ackerly, 2009) given a tree and a set of continuous trait values.

Usage

plotTraitgram(trait, tree, trait.name = "'trait'", conf.int = TRUE, lwd = 1.5)

Arguments

trait
a vector of continuous trait values
tree
a phylo object
trait.name
The name of the trait plotted, used for the figure's main title
conf.int
if true, confidence intervals are plotted
lwd
The line width used for the figure

Value

  • Returns no value, just plots the traitgram.

Details

By default, this function uses ace from the library ape to reconstruct ancestral traits and confidence intervals using the PIC method. As with many functions in the paleotree library, absolute time is always decreasing, i.e. the present day is zero.

References

Ackerly, D. 2009 Conservatism and diversification of plant functional traits: Evolutionary rates versus phylogenetic signal. Proceedings of the National Academy of Sciences 106(Supplement 2):19699--19706.

See Also

ace Also see the functions traitgram in the library picante and phenogram in the library phytools.

Examples

Run this code
set.seed(444)
tree <- rtree(10)
trait <- rTraitCont(tree)

#first, traitgram without conf intervals
plotTraitgram(trait,tree,conf.int=FALSE)

#now, with
plotTraitgram(trait,tree)
#not much confidence, eh?

Run the code above in your browser using DataLab