SS_recdevs: Insert a vector of recruitment deviations into the control...

View source: R/SS_recdevs.R

SS_recdevsR Documentation

Insert a vector of recruitment deviations into the control file.

Description

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.

Usage

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
)

Arguments

fyr

First year of the recdev vector.

lyr

Last year of the recdev vector.

ctl

Either NULL to read anew or an already read control file. Default=NULL.

recdevs

Either NULL to generate anew or an already generated vector of recdevs. Default=NULL.

rescale

Should the recdevs be rescaled to have mean = 0 and std. deviation = sigmaR? Default=TRUE.

scaleyrs

Vector of years over which rescaling (if chosen) should occur.

dir

Directory where files are located. Default is to use the working directory in use by R. Default="working_directory".

ctlfile

Name of control file to modify. Default="control.ss_new".

newctlfile

Name of new file to output modified control file. Default="control_modified.ss".

verbose

Verbose output to R command line? Default=TRUE.

writectl

Write new file? Default=TRUE.

returnctl

Return contents ctl file as an object in the R workspace. Default=FALSE.

newmaxbias

Replace the maximum bias adjustment fraction with any non-NULL value. Default=NULL.

Author(s)

Ian Taylor


r4ss documentation built on May 28, 2022, 1:11 a.m.