Description Usage Arguments Details Value Author(s) References See Also
View source: R/transitions_through_time.R
This function provides a way of summarizing the temporal dynamics of traits by
registering the times when there are transitions between character states.
First, a number of replicates of stochastic character mappings are created
(see make.simmap
for more details), and the phylogeny
is traversed in order to register the moments in time when there are
transitions between states. For every time a transition occurs, the function
will follow all descendants and also register the point in time where that
instance of a given state goes extinct (either by all descendants
transitioning to a different state or by all tips going extinct).
1 | transitions_through_time(tree, char, repl = 100, model = "ER", plot = T)
|
tree |
Phylogenetic tree in 'phylo' format. |
char |
Named vector including character states for all tips. Names need to correspond to tips in the phylogeny. |
repl |
Number of replicates of stochastic character mapping (default = 100) |
model |
A character specifying the model of evolution used to
reconstruct the evolutionary history of the character. Options include
|
plot |
A logical indicating whether to plot the results. Default is
|
The funtion only requires a tree and a character, and allows the user to
modify the number of replicates, the model used for character mapping, as well
as whether to return a plot summarizing the results. More control on what and
how to plot these results is attained by providing the output to the function
plot_ttt
.
A data.frame including the times of birth and death of each instance
of a character across replicates. This object can be passed to
plot_ttt
to obtain different visualizations.
Nicolás Mongiardino Koch
Mongiardino Koch N. 2021. Exploring adaptive landscapes across deep time: A case study using echinoid body size. Evolution, https://doi.org/10.1111/evo.14219.
For details on stochastic character mapping visit
make.simmap
. Plots can be explored with
plot_ttt
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.