- filename
a character vector indicating whether the output should be saved to two respective files
containing the simulation design and the functional components, respectively. Using this option
is generally the recommended approach when beginning to write a Monte Carlo simulation
- dir
the directory to write the files to. Default is the working directory
- save_structure
character indicating the number of files to break the simulation code into
when filename
is included (default is 'single' for one file). When save_structure = 'double'
the
output is saved to two separate files containing the functions and design definitions,
and when save_structure = 'all'
the generate, analyse, summarise, and execution code area all saved into
separate files. The purpose for this structure is because multiple structured files
often makes organization and debugging slightly easier larger Monte Carlo simulations, though in principle
all files could be stored into a single R script
- extra_file
logical; should and extra file be saved containing user-defined functions or objects?
Default is FALSE
- nAnalyses
number of analysis functions to create (default is 1). Increasing the value
of this argument when independent analysis are being performed allows function definitions
to be better partitioned and potentially more modular
- nGenerate
number of generate functions to create (default is 1). Increase the value
of this argument when when the data generation functions are very different and should
be isolated from each other (otherwise, if there is much in common between the generate
steps, the default of 1 should be preferred). Otherwise, if nGenerate == 0
then no generate function will be provided and instead this data-generation
step can be defined in the analysis function(s) (only recommended for smaller simulations)
- summarise
include summarise
function? Default is TRUE
- comments
logical; include helpful comments? Default is FALSE
- openFiles
logical; after files have been generated, open them in your text editor
(e.g., if Rstudio is running the scripts will open in a new tab)?
- spin_header
logical; include a basic knitr::spin
header to allow the simulation
to be knitted? Default is TRUE
. For those less familiar with spin
documents
see https://bookdown.org/yihui/rmarkdown-cookbook/spin.html
for further details
- SimSolve
logical; should the template be generated that is intended for a
SimSolve
implementation? Default is FALSE