Create a folder containing retrospective runs for a given base-model folder. Runs are created using settings specified in model_settings and is formatted for inclusion in a document.

run_retro(mydir, model_settings, skipruns = FALSE)

Arguments

mydir

Directory where model files are located. There is no default entry for mydir. An example of user input could be mydir = file.path("C:/my_models", "base_model").

model_settings

A list of all model settings. Typically, created using get_settings but users can create their own list, as long as it has all of the necessary components for the function at hand.

skipruns

Skip the steps where models are run and files are renamed. This facilitates reloading the results and makeing plots after manually replacing some of the model output.

Value

Nothing is explicitly returned from retro_wrapper. The following objects are saved to the disk.

  • mohnsrho.csv with the following columns:

  • A set of figures from r4ss::SSplotComparisons

  • retrofigures4doc.csv for use with sa4ss::add_figure to add retro peels of spawning stock biomass (SSB) and fraction unfished, complete with captions and alternative text.

    apply(utils::read.csv(file.path("..", paste0(mod_loc, "_retro"), "retrofigures4doc.csv")), 1, function(x) do.call(sa4ss::add_figure, as.list(x)))

  • mohnsrho.tex for use with sa4ss::read_child() inside of an environment with results = "asis" to include a table of Mohn's rho values in a document.

    sa4ss::read_child(file.path(paste0(params[["model"]], "_retro"), "mohnsrho.tex"))

  • retro_output.Rdata with a list of R objects.

See also

The following functions interact with retro_wrapper:

Author

Chantel Wetzel