Description Usage Arguments Value Author(s) Examples
View source: R/copy_ss3models.r
Copy the operating and estimation models and create a folder structure
1 2 | copy_ss3models(model_dir, scenarios, iterations = 1:100, type = c("om",
"em"))
|
model_dir |
A directory containing the operating or estimation
model. Each folder should be named according to a scenario ID. (See
the vignette |
scenarios |
Which scenarios to copy to. Supply a vector of character elements. |
iterations |
A numeric vector of the iterations to copy to. The function will create the folders as needed. |
type |
Are you copying operating or estimation models? This affects whether the model folder gets named "om" or "em" |
An invisible boolean for whether that iteration already existed. A set of nested folders starting with the scenario ID, then the iterations, then "om" or "em", and then the SS model files.
Sean Anderson, Kelli Johnson
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Locate the package data:
om_folder <- system.file("extdata", "models", "cod-om", package =
"ss3sim")
# Copy the operating model:
copy_ss3models(model_dir = om_folder, type = "om", iterations =
1:3, scenarios = "D0-F0-testing")
# Now look at your working directory in your file system
# Copy the estimation model with two scenario IDs:
copy_ss3models(model_dir = om_folder, type = "em", iterations = 1:2,
scenarios = c("D1-F0-testing", "D2-F0-testing"))
# (Note that all the scenario argument does here is affect the
# folder names.)
# Clean up:
unlink("D0-F0-testing", recursive = TRUE)
unlink("D1-F0-testing", recursive = TRUE)
unlink("D2-F0-testing", recursive = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.