
Rates of trait evolution from the turnover of partners in a metacommunity
Source:R/traits_rates.R
turnover_rates.RdTurns the turnover of interaction partners of each species in a simulated metacommunity,
from partner_turnover(), into rates of evolution of a continuous trait on the branches of
its tree, for trait_rates(edge_rates = ). It implements the expectation that evolution
speeds up with each change in the community around a lineage and stays slow while the
community is stable (McPeek 2017; scenario 5 of the notes on branch rates).
Usage
turnover_rates(
x,
tree = x$tree,
sigma2 = 1,
k = 1,
window = NULL,
partners = c("all", "competitors")
)Arguments
- x
An
mc_simobject withhistory, that is, run withrecord_steps.- tree
The tree of the species in
x; by default the one stored inx.- sigma2
Rate outside the stretch informed by the metacommunity.
- k
Increase of the rate, relative to
sigma2, per unit of turnover (partners gained or lost per site and time step).- window
Length of the end of each tip branch represented by the metacommunity, in the units of the branch lengths;
NULLuses the whole tip branch. A window longer than a tip branch is cut to its length.- partners
"all"counts every other species as a partner;"competitors"counts only the species with a non-zero competition coefficient with the focal species inx$alpha(in either direction).
Value
Numeric vector with the rate of each branch, in the order of the rows of
tree$edge, with the turnover of each species as attribute "turnover".
Details
The metacommunity runs in ecological time among the species at the tips, so its dynamics
only inform the tip branches, and how ecological time relates to branch lengths is a choice
of the user, not something the simulation gives. Here the dynamics are taken to represent
the last window units of time of each tip branch: in that stretch the rate is
\(\mathrm{sigma2}\, (1 + k \cdot \mathrm{turnover})\), and
elsewhere, including all internal branches, it is
sigma2. The rate of a tip branch is the mean over the branch, weighted by time.
References
McPeek, M. A. (2017). Evolutionary Community Ecology. Princeton University Press. doi:10.23943/princeton/9780691088778.001.0001
See also
partner_turnover(), history_rates(), trait_rates()
Other species traits:
arrival_ages(),
as_herodotools(),
food_web_rates(),
history_rates(),
paint_regimes(),
partner_turnover(),
plot.rate_matrix(),
plot_rates(),
plot_traits(),
rate_matrix(),
region_pool(),
species_traits(),
tip_history_metrics(),
trait_bm(),
trait_mk(),
trait_ou(),
trait_rates()
Examples
set.seed(1)
tr <- treeshapesim::sim_tree_shape(10)
sim <- simulate_metacommunity(landscape_implicit(15), species_traits(tr),
competition_matrix(tr, "none"), n_steps = 300,
record_steps = seq(100, 300, 20), extirpation = 0.02)
rates <- turnover_rates(sim, k = 20, window = 0.1)
x <- trait_rates(tr, edge_rates = rates)