SS_doRetro: Run retrospective analyses

Description Usage Arguments Author(s) See Also Examples

View source: R/SS_doRetro.R

Description

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.

Usage

1
2
3
SS_doRetro(masterdir, oldsubdir, newsubdir='retrospectives',
subdirstart='retro', years=0:-5, overwrite=TRUE, extras="-nox",
intern=FALSE)

Arguments

masterdir

Directory where everything takes place.

oldsubdir

Subdirectory within masterdir with existing model files.

newsubdir

Subdirectory within masterdir where retrospectives will be run. Default is 'retrospectives'.

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.

extras

Additional commands to use when running SS. Default = "-nox" will reduce the amound of command-line output.

intern

Display runtime information from SS in the R console (vs. saving to a file).

Author(s)

Ian Taylor

See Also

SSgetoutput

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  ## 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)

r4ss documentation built on May 2, 2019, 4:56 p.m.