get_gradient | R Documentation |
Computes the selection gradient given a resident value and model parameters.
get_gradient(xres, pars, init)
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 |
The functions uses find_equilibrium
to compute the
equilibrium population sizes (in the two habitats) given the resident trait
value, which are needed to compute the gradient.
The selection gradient
find_equilibrium
pars <- get_default_pars()
get_gradient(0, pars, init = rep(1000, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.