View source: R/population_transformation.R
population_transformation | R Documentation |
Modular functions for the population simulator for performing a transformation of the stage abundance (and optionally carrying capacity) at a specified time step via a user-defined function.
population_transformation(
replicates,
time_steps,
years_per_step,
populations,
demographic_stochasticity,
density_stages,
transformation,
simulator,
name = "transformation"
)
replicates |
Number of replicate simulation runs. |
time_steps |
Number of simulation time steps. |
years_per_step |
Number of years per time step. |
populations |
Number of populations. |
demographic_stochasticity |
Boolean for optionally choosing demographic stochasticity for the transformation. |
density_stages |
Array of booleans or numeric (0,1) for each stage to indicate which stages are affected by density. |
transformation |
A user-defined function (optionally nested in a list with additional attributes) for performing transformation:
returns a transformed stage abundance matrix (or a list with stage abundance and carrying capacity) |
simulator |
|
name |
Optional name for the transformation (default is "transformation"). |
Abundance (and capacity) transformation function: function(r, tm, carrying_capacity, stage_abundance, occupied_indices)
, where:
r
Simulation replicate.
tm
Simulation time step.
carrying_capacity
Array of carrying capacity values for each population at time step.
stage_abundance
Matrix of abundance for each stage (rows) and population (columns) at time step.
occupied_indices
Array of indices for populations occupied at time step.
returns
List with transformed stage abundance matrix (and optionally carrying capacity).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.