Runs Stics simulations for the USMs found in usms_workspace (a
text workspace as generated by gen_workspace_from_sms),
and saves the resulting simulation and observation data as
.rds files in output_dir. The saved files can later be
reused as sim_rds/ref_sim_rds and obs_rds by
evaluate or balance_closure_test, bypassing
the need to run simulations or extract observations again.
run_simulations(
stics_exe,
usms_workspace,
metadata_file,
output_dir,
usms_files = NULL,
vars = NULL,
parallel = FALSE,
cores = NA
)path to the Stics executable
path to the Stics text workspace containing the USMs to simulate
path to the metadata CSV file describing USM rotations (successive USMs)
directory where the simulation results
(simulations.rds) and observation data (observations.rds)
will be written. Created if it doesn't exist.
character vector of one or more paths to text files,
each containing one USM name per line. If NULL (default), all USMs
found in usms_workspace are simulated.
character vector of variable names to simulate. If NULL
(default), the variables are derived automatically from the observation
files found in usms_workspace. Pass this explicitly to simulate
variables that aren't observed, e.g. the balance closure variables
consumed by balance_closure_test.
Boolean. Is the computation to be done in parallel ?
Number of cores to use for parallel computation
invisibly, a list with two elements: sim and obs,
each a list of results (one tibble per USM), as returned by
SticsOnR::stics_wrapper and SticsRFiles::get_obs
respectively