Copy the OM or EM into a scenario directory

copy_ss3models(model_dir, scenario, iteration = 1, type = c("om", "em"))

Arguments

model_dir

A directory containing an OM or EM.

scenario

A string giving the scenario name which will be used in the resulting directory name. If you want this directory created somewhere other than your current working directory, you can pass a full file path with the last level being the new scenario name. All intermediate directories that do not exist will be created.

iteration

An integer specifying the iteration of interest.

type

Either "om" or "em" depending on which type of model folder needs created.

Value

An invisible boolean for whether that iteration already existed.

Author

Sean C. Anderson, Kelli F. Johnson

Examples

# Locate the package data:
om_folder <- system.file(
  "extdata", "models", "cod-om",
  package = "ss3sim"
)

# Copy the operating model:
copy_ss3models(
  model_dir = om_folder,
  scenario = "D0-F0-testing"
)
# Now look at your working directory in your file system

# Copy the EM
copy_ss3models(
  model_dir = om_folder,
  type = "em",
  scenario = "D1-F0-testing"
)
# Scenario argument affects the folder names.

# Clean up:
unlink("D0-F0-testing", recursive = TRUE)
unlink("D1-F0-testing", recursive = TRUE)