plotTraitgram {paleotree} | R Documentation |
Plot a Traitgram for Continuous Traits
Description
plotTraitgram
plots a traitgram showing the evolution of a continuous trait.
If node values are not given (i.e. the data is empirical data collected from tips,
rather than simulated data), maximum-likelihood ancestral trait estimation is used
to calculate node values. (Ackerly, 2009) given a tree and a set of continuous trait
values.
Usage
plotTraitgram(trait, tree, main = "", conf.int = TRUE, lwd = 1.5)
Arguments
trait |
A vector of continuous trait values. If the length of |
tree |
A |
main |
Main title of traitgram plot. |
conf.int |
If |
lwd |
The line width used for branches in the figure. |
Details
By default, this function will use ace
from the library ape
to
reconstruct ancestral traits and confidence intervals using the PIC method, if internal
node values (i.e. ancestral node values) are not given.
As with many functions in the paleotree library, absolute time is always decreasing, i.e. the present day is zero.
Value
Return no value, just plot the traitgram.
Note
One should probably never do ancestral trait estimation without looking at the confidence intervals, as these reconstructed estimates tend to be very uncertain.
Author(s)
David W. Bapst
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
Also see the functions traitgram
in the library picante and
phenogram
in the library phytools.
Examples
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?
# plotting simulated data
# with values for ancestral nodes as input
trait <- rTraitCont(tree, ancestor = TRUE)
plotTraitgram(tree = tree,trait = trait)