Skip to contents

This function takes care of calling SS. Importantly, it parses whether the user is on Unix or Windows and calls the binary correctly. This lower-level function is meant to be called by higher level functions. Modified from run_ss3model in ss3sim.

Usage

run_ss_model(
  dir,
  admb_options = "",
  ss_bin = "ss",
  ignore.stdout = TRUE,
  admb_pause = 0.05,
  show.output.on.console = FALSE,
  check_run = TRUE,
  debug_par_run = FALSE,
  verbose = FALSE,
  ...
)

Arguments

dir

The full or relative path to the model directory

admb_options

Any options to pass to SS command. Should be of the form '-option'. Note that no checks are done to ensure this is a valid ADMB command

ss_bin

Name of the SS executable. Defaults to "ss"

ignore.stdout

Passed to system. If TRUE then ADMB output is not printed on screen. This will be slightly faster. Set to FALSE to help with debugging.

admb_pause

A length of time (in seconds) to pause after running the simulation model. This can be necessary on certain computers where file writing can be slightly delayed. For example, on computers where the files are written over a network connection. If the output files haven't finished writing before R starts looking for the output then the simulation will crash with an error about missing files. The default value is set to 0.01 seconds, just to be safe.

show.output.on.console

Logical: passed on to system.

check_run

Should it be checked that the model ran by deleting the data.ss_new file if one exists and then checking if one was created? Defaults to TRUE.

debug_par_run

If set to TRUE, and the run fails, a new folder called error_check will be created, and the model will be run from control start values instead of ss.par. The 2 par files are then compared to help debug the issue with the model run. Defaults to FALSE.

verbose

Want verbose output? Defaults to FALSE.

...

Anything else to pass to system.

Author

Sean C. Anderson, Kathryn Doering