Step Template to Create a Single Sim File per Scenarios Using the Files From netsim_scenarios
Source: R/netsim_scenarios.R
step_tmpl_merge_netsim_scenarios.RdStep Template to Create a Single Sim File per Scenarios Using the Files From
netsim_scenarios
Usage
step_tmpl_merge_netsim_scenarios(
sim_dir,
output_dir,
keep.transmat = TRUE,
keep.network = TRUE,
keep.nwstats = TRUE,
keep.other = TRUE,
param.error = FALSE,
keep.diss.stats = TRUE,
truncate.at = NULL,
n_cores = 1,
setup_lines = NULL
)Arguments
- sim_dir
The folder where the simulation files are to be stored.
- output_dir
The folder where the merged files will be stored.
- keep.transmat
If
TRUE, keep the transmission matrices from the originalxandyelements. Note: transmission matrices only saved when (save.transmat == TRUE).- keep.network
If
TRUE, keep thenetworkDynamicobjects from the originalxandyelements. Note: network only saved when (tergmLite == FALSE).- keep.nwstats
If
TRUE, keep the network statistics (as set by thenwstats.formulaparameter incontrol.netsim) from the originalxandyelements.- keep.other
If
TRUE, keep the other simulation elements (as set by thesave.otherparameter incontrol.netsim) from the originalxandyelements.- param.error
If
TRUE, ifxandyhave different params (inparam.net) or controls (passed incontrol.net) an error will prevent the merge. UseFALSEto override that check.- keep.diss.stats
If
TRUE, keepdiss.statsfrom the originalxandyobjects.- truncate.at
Time step at which to left-truncate the time series.
- n_cores
Parallelize the process over
n_cores(default = 1)- setup_lines
(optional) a vector of bash lines to be run first. This can be used to load the required modules (like R, python, etc).
Step Template
Step Templates are helper functions to be used within add_workflow_step.
Some basic ones are provided by the slurmworkflow package. They instruct
the workflow to run either a bash script, a set of bash lines given as a
character vector or an R script.
Additional Step Templates can be created to simplify specific tasks. The
easiest way to do so is as wrappers around existing templates.