R/dispersal.r
Generate linear or negative exponential dispersal kernel functions, taking a
distance, d
, and returning the probability density of dispersing that
distance.
dispersal_linear(dmax) dispersal_negexp(alpha)
dmax | numeric; maximum dispersal distance. |
---|---|
alpha | numeric; exponential decay rate parameter, equal to the inverse of the mean dispersal distance. |
A dispersal kernel function.
The available dispersal kernel functions are:
dispersal_linear
: decays linearly from 1 and d = 0
to 0 at d = dmax
.
dispersal_negexp
: decays exponentially with rate parameter alpha
.
dl <- dispersal_linear(10) dne <- dispersal_negexp(1/5) dl(5)#> [1] 0.5dne(5)#> [1] 0.3678794