View source: R/shift_positions.R
shift_positions | R Documentation |
shift_positions
peturbs the positions of a matrix of positions by
distances drawn from an exponential distribution. Dispersal is simulated in a
square habitat of width box_limit
centred on x=y=0.
shift_positions(coords, mean_dispersal_distance, box_limit)
coords |
Matrix with a row for each individual and two rows. |
mean_dispersal_distance |
Float giving the average perturbation distance. The reciprocal of this value is used as a rate for the exponential distribution. |
box_limit |
Float >1 giving half the width of the habitat. |
Dispersal is in a box. If the simulated dispersal distance takes a seed beyond the boundary of the habitat it will be reflected back into the habitat. Note that if dispersal distances are much larger than the habitat size then it could be that the reflected distance goes beyond the other limit of the population.
A matrix matching the shape of the input coords
, but with values
shifted by some exponential distance.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.