View source: R/plotTraitgram.R
plotTraitgram | R Documentation |
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.
plotTraitgram(trait, tree, main = "", conf.int = TRUE, lwd = 1.5)
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. |
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.
Return no value, just plot the traitgram.
One should probably never do ancestral trait estimation without looking at the confidence intervals, as these reconstructed estimates tend to be very uncertain.
David W. Bapst
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.
ace
Also see the functions traitgram
in the library picante and
phenogram
in the library phytools.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.