Make a new simulation objectSource:
new_simulation(name, label, dir = ".", refs = list(), save_to_file = TRUE)
a short name identifier. Must be alphanumeric.
a longer, human readable label that can have other characters such as spaces, hyphens, etc.
a directory that reference's directories are relative to
whether this new simulation should be saved to file. Default is TRUE. If TRUE, then this simulation can be loaded in a new R session using
A Simulation object is the basic unit of a simulation study. Roughly, one
can think of it as all the files relevant to a single figure. This might be
a single plot or a series of related plots/panels. It could also correspond
to a single table. Note that a Simulation object is light-weight even for
large simulations because it only stores references to the objects
not the objects themselves. The functions
evals can be used
to load individual objects of a simulation.
The Simulation object created is saved to a file so that it can be loaded in a new R session. The simulation is saved in dir/files/name.Rdata. Note: while "files" is the default, the name of this directory is from getOption("simulator.files"), which is the value of getOption("simulator.files") when the model was created.
sim <- new_simulation(name = "normal-example", label = "Normal Mean Estimation", dir = tempdir())