Function for running a stepwise simulation.
1 2 3 4 |
functions |
An enviornment (could be coerced from a list) with any additional functions needed by the simulation. |
data |
An environment (could be coerced from a list) with all immutable data for the simulation. |
data_transformations |
code snippet run once, created by quoting a bracketed expression, (e.g.-quote(a <- 3; b <- 3*a)), which will be used to transform data once prior to simulation. |
initial_states |
An environment (could be coerced from a list) with the initial state of simulation parameters. |
simulation |
A code snippet, run once per step, created by quoting a bracketed expression, (e.g.-quote(a <- 3; b <- -1*a), which will be used to transform the simulation state once per step. This code can not modify the data. |
generated_quantities |
A code snippet, run once per step, after simulation, which will be used to generate output dependent on the simulated state. |
n_steps |
total number of simulation iterations to run. |
sandbox |
if TRUE the parent.env where the call is made will not be available to the code. For full effects see ?create_sandbox. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.