Description Usage Arguments Examples

Pre-defined functions to operate on a population demography during a simulation.

1 2 3 4 5 6 | ```
environmental_stochasticity(transition_matrix, stochasticity = 0)
density_dependence(transition_matrix, fecundity_fraction = 1,
survival_fraction = 1)
surv_fec_modify(transition_matrix, surv_layers, fec_layers)
``` |

`transition_matrix` |
A life-stage transition matrix. |

`stochasticity` |
A matrix with standard deviations (consistent or varying) around the transition means with dimensions matched to the life-stage transition matrix or a number representing a consistent standard deviation to apply to all transitions (default is 0). |

`fecundity_fraction` |
A multiplier value between 0 and 1 for fecundity values in the transition matrix. |

`survival_fraction` |
A multiplier value between 0 and 1 for survival values in the transition matrix. |

`surv_layers` |
a list of raster stacks with multipliers for survival equal to the number of life-stages. |

`fec_layers` |
a list of raster stacks with multipliers for fecundities equal to the number of life-stages. Note, life-stages that do not reproduce will have NULL in place of the raster stack. |

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ```
library(steps)
mat <- matrix(c(0.000,0.000,0.302,0.302,
0.940,0.000,0.000,0.000,
0.000,0.884,0.000,0.000,
0.000,0.000,0.793,0.793),
nrow = 4, ncol = 4, byrow = TRUE)
colnames(mat) <- rownames(mat) <- c('Stage_1','Stage_2','Stage_3','Stage_4')
mat_sd <- .01
# Use the demo_environmental_stochasticity function to modify the transition
# matrix with specified environmental stochasticity:
test_demo_es <- demo_environmental_stochasticity(transition_matrix = mat,
stochasticity = mat_sd)
# Use the demo_density_dependence function to modify the transition
# matrix once carrying capacity is reached:
test_demo_dd <- demo_density_dependence(transition_matrix = mat,
fecundity_fraction = 1,
survival_fraction = 0.5)
# Use the demo_surv_fec_modify function to modify the
# demography using explicit survival and fecundity layers:
test_survfec <- demo_surv_fec_modify(transition_matrix = mat,
surv_layers = surv,
fec_layers = fec)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.