Get model values across retrospective runs
get_retro_quants(mydir, model_settings, output)
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")
.
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.
List of model output created by run_retro()
.
Nothing is explicitly returned from get_retro_quants()
.
The following objects are saved to the disk.
mohnsrho.csv
with the following columns:
type: the type of Mohn's rho
Woods Hole Mohn's rho (Legault 2009) used by the Northeast Fisheries Science Center (NEFSC), and
Hurtado-Ferro et al. (2015) used by the Alaska Fisheries Science Center (AFSC)
Quantity: the stock assessment quantity of interest
values: the Mohn's rho values
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"))