View source: R/get_gradient_di.R
get_gradient_di | R Documentation |
Computes the selection gradients of the two morphs after branching has occurred.
get_gradient_di(xres1, xres2, pars, init)
xres1 |
The resident trait value in the first morph |
xres2 |
The resident trait value in the second morph |
pars |
An unevaluated parameter-list (e.g. as returned by
|
init |
A vector of four starting values for solving of the demographic equilibrium |
The functions uses find_equilibrium_di
to compute the
equilibrium population sizes (in the two habitats and for the two morphs)
given the resident trait values, which are needed to compute the gradients.
A vector of two selection gradients, one for each morph
find_equilibrium_di
pars <- get_default_pars()
get_gradient_di(-0.001, 0.001, pars, init = rep(1000, 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.