A function to insert a vector of recruitment deviations into the control file for simulation studies. This can also be achieved by using the .par file, but Ian Taylor prefers this approach for no good reason.
SS_recdevs(
fyr,
lyr,
ctl = NULL,
recdevs = NULL,
rescale = TRUE,
scaleyrs = NULL,
dir = "working_directory",
ctlfile = "control.ss_new",
newctlfile = "control_modified.ss",
verbose = TRUE,
writectl = TRUE,
returnctl = FALSE,
newmaxbias = NULL
)
First year of the recdev vector.
Last year of the recdev vector.
Either NULL to read anew or an already read control file. Default=NULL.
Either NULL to generate anew or an already generated vector of recdevs. Default=NULL.
Should the recdevs be rescaled to have mean = 0 and std. deviation = sigmaR? Default=TRUE.
Vector of years over which rescaling (if chosen) should occur.
Directory where files are located. Default is to use the working directory in use by R. Default="working_directory".
Name of control file to modify. Default="control.ss_new".
Name of new file to output modified control file. Default="control_modified.ss".
Verbose output to R command line? Default=TRUE.
Write new file? Default=TRUE.
Return contents ctl file as an object in the R workspace. Default=FALSE.
Replace the maximum bias adjustment fraction with any non-NULL value. Default=NULL.