get_lambda | R Documentation |
Computes the invasion fitness of a mutant in a resident population, given trait values and model parameters.
get_lambda(x, xres, pars, init, fast = FALSE)
x |
The mutant trait value |
xres |
The resident trait value |
pars |
An unevaluated parameter-list (e.g. as returned by
|
init |
A vector of two starting values for solving of the demographic equilibrium |
fast |
See the "Details" section |
This function computes an expression for the leading eigenvalue of the transition matrix of the model, which is the invasion fitness of the mutant.
The function will find the demographic equilibrium of the resident (passing
init
to find_equilibrium
) only if fast = FALSE
.
Otherwise, init
is interpreted as a vector of equilibrium population
sizes (useful when computing the invasion fitness of many mutants in the
same resident population, e.g. in plot_pip
).
The invasion fitness of the mutant given the resident
plot_pip
, find_equilibrium
pars <- get_default_pars()
get_lambda(0.01, 0, pars, init = rep(1000, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.