View source: R/batch_simulation.R
batch_simulation | R Documentation |
Perform a batch simulation.
batch_simulation(arg_grid, sim_fun, default_list, bigmemory = TRUE, ...) ## S3 method for class 'batch_simulation' print(x, detail = FALSE, ...)
arg_grid |
An |
sim_fun |
The simulation function. See |
default_list |
A list of default values for |
bigmemory |
Use |
... |
Other parameters passed to |
x |
An |
detail |
Do you want to print the object details as a full list? |
A batch_simulation
object, also a data frame.
The first column, var
, is a list of
ele_list
that contains all the variables; the second to the second
last columns are the values of the variables; the last column is the
output of the simulation function.
batch_simulation()
: Perform a batch simulation.
batch_arg_set_grad <- new_arg_set() batch_arg_set_grad <- batch_arg_set_grad %>% add_arg_ele( arg_name = "parameter", ele_name = "a", start = -6, end = -1, by = 1 ) batch_grid_grad <- make_arg_grid(batch_arg_set_grad) batch_output_grad <- batch_simulation(batch_grid_grad, sim_fun_grad, default_list = list( initial = list(x = 0, y = 0), parameter = list(a = -4, b = 0, c = 0, sigmasq = 1) ), length = 1e2, seed = 1614, bigmemory = FALSE ) print(batch_output_grad)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.