plot_pip | R Documentation |
Generates a PIP showing the combinations of mutant and resident trait values for which the mutant invades the resident (i.e. has an invasion fitness greater than one).
plot_pip(xvalues, pars, init, binary = TRUE, plotit = TRUE)
xvalues |
A vector of trait values over which to compute the invasion fitness. Each value will be taken both as a mutant and as a resident trait value, so all pairwise combinations will be evaluated. |
pars |
An unevaluated parameter-list (e.g. as returned by
|
init |
A vector of two starting values for solving of the demographic equilibrium |
binary |
Whether or not to plot whether the mutant invades ( |
plotit |
Whether to return a plot or the underlying tibble |
The function computes the invasion fitness for all pairwise
combinations of mutants and residents, but recycles equilibrium population
sizes computed for each resident to gain in speed (using fast = TRUE
in get_lambda
).
A ggplot
object
get_lambda
, find_equilibrium
pars <- get_default_pars()
plot_pip(seq(-1, 1, 1), pars, init = rep(1000, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.