Use r4ss::SS_output()
to read model output from
Stock Synthesis and save the resulting object as .RData
.
read_model(
mod_loc,
save_loc = NULL,
plotfolder = "plots",
printstats = deprecated(),
fecund_mult = "million eggs",
create_plots = TRUE,
png = deprecated(),
html = deprecated(),
datplot = deprecated(),
fleetnames = NULL,
forecastplot = TRUE,
maxrows = 4,
maxcols = 4,
bub_scale = 6,
create_tables = deprecated(),
ci_value = 0.95,
es_only = FALSE,
tables = c("a", "b", "c", "d", "e", "f", "g", "h", "i", "catch", "timeseries",
"numbers"),
divide_by_2 = FALSE,
adopted_ofl = NULL,
adopted_abc = NULL,
adopted_acl = NULL,
forecast_ofl = NULL,
forecast_abc = NULL,
...
)
A file path to the directory that houses the Stock Synthesis model that will be used as the base model in this document.
An optional argument passed to es_table_tex()
pointing to
the directory where you want .tex
files to be saved to.
For example, file.path(getwd(), "doc")
. Use full paths.
See es_table_tex()
for details of the default behavior i.e., NULL
,
which leads to file.path(mod_loc, table_folder)
.
A file path relative to mod_loc
where
the figures will be saved. The argument is passed to printfolder
in
r4ss::SS_plots()
. The default is plots
.
printstats = FALSE
is no longer supported;
this function will always suppress printing output to the screen with
r4ss::SS_output(printstats = FALSE, verbose = FALSE)
.
A character string,
providing the multiplier for fecundity in terms of eggs
if fecundity is defined in terms of numbers within Stock Synthesis.
The default is millions of eggs but billions or thousands could be used.
If the fecundity units, i.e.,
r4ss::SS_output()$SpawnOutputUnits == "biomass"
,
then fecund_unit
will be changed to `fecund_unit = "mt".
A logical that leads to executing r4ss::SS_plots()
and creating the suite of r4ss figures,
where default is TRUE
.
png = FALSE
is no longer supported;
this function will always print graphics to the disk if create_plots = TRUE
,
which is the default behavior of r4ss::SS_plots()
.
html = TRUE
is no longer supported;
this function will always stop r4ss::SS_plots()
from running
r4ss::SS_html()
.
datplot = FALSE
is no longer supported; plots of the data are
always created with r4ss::SS_plots(datplot = TRUE)
.
A vector of user-defined fleet names.
The default behavior of NULL
leads to the use of
fleetnames = r4ss::SS_output$FleetNames
.
forecastplot = FALSE
is no longer supported; plots of the data are
always created with r4ss::SS_plots(forecastplot = TRUE)
.
This behavior helps ensure that users of Stock Synthesis are aware
of the specifications that are present in the forecast file, i.e.,
if you do not want to display forecasts then turn off forecasting in
the forecast.ss
file.
Number of rows for plots. Default set to 4.
Number of columns for plots. Default set to 4.
Bubble scale size to use for plotting.
Passed to the bub.scale.dat =
argument in r4ss::SS_plots()
.
create_tables
is no longer needed; the call to
r4ss::SSexecutivesummary()
is made if a character vector is
passed to the tables
argument, and thus, the old behavior of
create_tables = FALSE
can be recreated with tables = NULL
.
A single numerical value specifying the desired
confidence interval, where the default is to calculate the 95% interval.
ci_value
is passed to r4ss::SSexecutivesummary()
.
TRUE/FALSE switch to produce only the executive summary tables will be produced, default is FALSE which will return all executive summary tables, historical catches, and numbers-at-ages
Which tables to produce (default is everything). Note: some tables depend on calculations related to previous tables, so will fail if requested on their own (e.g., Table 'f' can't be created without also creating Table 'a')
This will allow the user to calculate single sex values based on the new sex specification (-1) in SS3 for single sex models. Default value is FALSE. TRUE will divide by 2.
Vector of adopted ofl values to be printed in the mangagement performance table. This should be a vector of 10 values.
Vector of adopted abc values to be printed in the mangagement performance table. This should be a vector of 10 values.
Vector of adopted acl values to be printed in the mangagement performance table. This should be a vector of 10 values.
Optional input vector for management adopted OFL values for table g. These values will be overwrite the OFL values in the projection table, rather than the model estimated OFL values. Example input: c(1500, 1300)
Optional input vector for management adopted ABC values for table g. These values will be overwrite the ABC values in the projection table, rather than the model estimated ABC values. Example input: c(1500, 1300)
Additional input arguments passed to SS_output
for reading
output files from Stock Synthesis into a list.
This RData object will have defined quantities such that sa4ss functions can easily be used to write documentation. Thus, saving users from having to perform multiple similar calculations.
if (FALSE) { # \dontrun{
simplemod_loc <- tail(dir(
pattern = "simple",
system.file("extdata", package = "r4ss"),
full.names = TRUE
), 1)
sa4ss::read_model(
mod_loc = simplemod_loc,
fecund_mult = "billion eggs"
)
} # }