SS_doRetro | R Documentation |
Do retrospective analyses by creating new directories, copying model files, and iteratively changing the starter file to set the number of years of data to exclude. Note that there was a bug for retrospectives in 3.30.01; the user should update their model to a newer version of Stock Synthesis to run retrospectives
SS_doRetro( masterdir, oldsubdir, newsubdir = "retrospectives", subdirstart = "retro", years = 0:-5, overwrite = TRUE, exefile = "ss", extras = "-nox", intern = FALSE, CallType = "system", RemoveBlocks = FALSE )
masterdir |
Directory where everything takes place. |
oldsubdir |
Subdirectory within |
newsubdir |
Subdirectory within |
subdirstart |
First part of the pattern of names for the directories in which the models will actually be run. |
years |
Vector of values to iteratively enter into the starter file for retrospective year. Should be zero or negative values. |
overwrite |
Overwrite any input files with matching names in the subdirectories where models will be run. |
exefile |
Executable file found in directory with model files. On Windows systems, this value will be automatically updated if a single executable exists in the directory of model files. Input exefile=NULL if the executable is in your path and doesn't need copying. |
extras |
Additional commands to use when running SS. Default = "-nox" will reduce the amount of command-line output. |
intern |
Display runtime information from SS in the R console (vs. saving to a file). |
CallType |
Either "system" or "shell" (choice depends on how you're running R. Default is "system". |
RemoveBlocks |
Logical switch determining whether specifications of blocks is removed from top of control file. Blocks can cause problems for retrospective analyses, but the method for removing them is overly simplistic and probably won't work in most cases. Default=FALSE. |
Ian Taylor, Jim Thorson
SSgetoutput()
## Not run: # note: don't run this in your main directory--make a copy in case something # goes wrong mydir <- "C:/Simple" ## retrospective analyses SS_doRetro( masterdir = mydir, oldsubdir = "", newsubdir = "retrospectives", years = 0:-5 ) retroModels <- SSgetoutput( dirvec = file.path(mydir, "retrospectives", paste("retro", 0:-5, sep = "")) ) retroSummary <- SSsummarize(retroModels) endyrvec <- retroSummary[["endyrs"]] + 0:-5 SSplotComparisons(retroSummary, endyrvec = endyrvec, legendlabels = paste("Data", 0:-5, "years") ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.