Description Usage Arguments Value Author(s) See Also Examples

Simulates growth, survival and fecundity to create a dataframe of the form required by the functions and methods used in IPMpack. Demographic stage data is only continuous.

1 | ```
generateData(nSamp=1000, type="simple")
``` |

`nSamp` |
number of samples desired in the base population, defaults to 1000 |

`type` |
the kind of simulated data required. Supported values include "simple" (which includes only a continuous stage and a discretely varying covariate); "discrete" (which includes a discretely varying life stage); and "stochastic" (which includes stochastically varying covariates) |

A dataframe with headings: - "size": continuous variable, indicating current size. - "sizeNext" continuous variable, indicating size in the next time step. - "surv": boolean, indicating whether individual survived or not to the next time step. - "covariate": discrete covariate (for type="simple"). - "covariateNext": discrete covariate in the next (for type="simple") time step. - "covariate1", "covariate2", "covariate3", ...: discrete or continuous covariates (for type="stochastic".

- "fec": continuous variable, indicating fecundity. - "stage": character vector, containing names of the discrete stages in that time-step, or "continuous" (for type="discrete"). - "stageNext": character vector, containing names of the "discrete" stages in the following time-step, or "continuous" size value (for type="discrete"). - "number": number of individuals moving between stages. "number" = 1 for all movements out of the "continuous" stage; "number" > 1 for all movements out of "discrete" stages. This allows the user to not need to have an individual line for every movement between discrete stages (for type="discrete").

C. Jessica E. Metcalf, Sean M. McMahon, Roberto Salguero-Gomez, Eelke Jongejans & Cory Merow.

1 2 3 4 5 6 7 8 | ```
dff <- generateData(nSamp=2000, type="simple")
head(dff)
dff <- generateData(nSamp=2000, type="discrete")
head(dff)
dff <- generateData(nSamp=2000, type="stochastic")
head(dff)
``` |

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.