Learn R Programming

steps (version 1.0.0)

growth: Population growth

Description

This function applies negative or positive growth to the population using matrix multiplication. Stochasticty can be added to cell-based transition matrices or globally. Users can also specify a built-in or custom function to modify the transition matrices throughout a simulation. Please see the tutorial vignette titled "Creating custom *steps* functions" for information on how to write custom functions for use in simulations.

Usage

growth(
  transition_matrix,
  global_stochasticity = 0,
  local_stochasticity = 0,
  transition_function = NULL,
  transition_order = c("fecundity", "survival")
)

Arguments

transition_matrix

A symmetrical age-based (Leslie) or stage-based (Lefkovitch) population structure matrix.

global_stochasticity, local_stochasticity

Either scalar values or matrices (with the same dimension as transition_matrix) specifying the variability (in standard deviations) in the transition matrix either for populations in all grid cells (global_stochasticity) or for each grid cell population separately (local_stochasticity)

transition_function

A function to specify or modify life-stage transitions at each timestep. See transition_function.

transition_order

Order of transitions performed in growth function. This behaviour is only applied when demographic stochasticity is set to "full" (default) and transitions are applied sequentially. By default "fecundity" is performed first (calculating the number of new individuals to be added to the populations), then "survival" is applied. The final population is the sum of these. Users should be cautious of specifying "survival" to be performed first as typically survival of reproductive stages will already be accounted for in the fecundity values of the transition matrix.

Examples

Run this code
# NOT RUN {
# Example of a growth function that changes the populations based on a transition matrix that
# is subject to global stochasticity. 

# }
# NOT RUN {
stoch_growth <- growth(transition_matrix = egk_mat, global_stochasticity = egk_mat_stoch)

ls <- landscape(population = egk_pop, suitability = NULL, carrying_capacity = NULL)

pd <- population_dynamics(change = stoch_growth)

simulation(landscape = ls, population_dynamics = pd, habitat_dynamics = NULL, timesteps = 20)
# }

Run the code above in your browser using DataLab