Reads the Report.sso and (optionally) the covar.sso, CompReport.sso and other files produced by Stock Synthesis and formats the important content of these files into a list in the R workspace. A few statistics unavailable elsewhere are taken from the .par and .cor files. Summary information and statistics can be returned to the R console or just contained within the list produced by this function.
SS_output(
dir = "C:/myfiles/mymodels/myrun/",
dir.mcmc = NULL,
repfile = "Report.sso",
compfile = "CompReport.sso",
covarfile = "covar.sso",
forefile = "Forecast-report.sso",
wtfile = "wtatage.ss_new",
warnfile = "warning.sso",
ncols = NULL,
forecast = TRUE,
warn = TRUE,
covar = TRUE,
readwt = TRUE,
checkcor = TRUE,
cormax = 0.95,
cormin = 0.01,
printhighcor = 10,
printlowcor = 10,
verbose = TRUE,
printstats = TRUE,
hidewarn = FALSE,
NoCompOK = TRUE,
aalmaxbinrange = 4
)
Directory containing the Stock Synthesis model output. Forward slashes or double backslashes and quotes are necessary. This can also either be an absolute path or relative to the working directory.
Optional directory containing MCMC output. This can either be
relative to dir
, such that file.path(dir, dir.mcmc)
will end up in the right place, or an absolute path.
Name of the big report file (could be renamed by user).
Name of the composition report file.
Name of the covariance output file.
Name of the forecast file.
Name of the file containing weight at age data.
Name of the file containing warnings.
The maximum number of columns in files being read in. If this
value is too big the function runs more slowly, too small and errors will
occur. A warning will be output to the R command line if the value is too
small. It should be bigger than the maximum age + 10 and the number of
years + 10. The default value is NULL
, which finds the optimum width.
Read the forecast-report file?
Read the Warning.sso file?
Read covar.sso to get variance information and identify bad correlations?
Read the weight-at-age file?
Check for bad correlations?
The specified threshold for defining high correlations. A quantity with any correlation above this value is identified.
The specified threshold for defining low correlations. Only quantities with all correlations below this value are identified (to find variables that appear too independent from the model results).
The maximum number of high correlations to print to the R GUI.
The maximum number of low correlations to print to the R GUI.
A logical value specifying if output should be printed to the screen.
Print summary statistics about the output to the R GUI?
Hides some warnings output from the R GUI.
Allow the function to work without a CompReport file.
The largest length bin range allowed for composition data to be considered as conditional age-at-length data.
Many values are returned. Complete list would be quite long, but should probably be created at some point in the future.
# NOT RUN {
# read model output
myreplist <- SS_output(dir = "c:/SS/Simple/")
# make a bunch of plots
SS_plots(myreplist)
# read model output and also read MCMC results (if run), which in
# this case would be stored in c:/SS/Simple/mcmc/
myreplist <- SS_output(dir = "c:/SS/Simple/", dir.mcmc = "mcmc")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab