SS_varadjust: Modify variance and sample size adjustments in the control...

View source: R/SS_varadjust.R

SS_varadjustR Documentation

Modify variance and sample size adjustments in the control file

Description

Function has not been fully tested yet

Usage

SS_varadjust(
  dir = "C:/myfiles/mymodels/myrun/",
  ctlfile = "control.ss_new",
  newctlfile = "control_modified.ss",
  keyword = "variance adjustments",
  newtable = NULL,
  newrow = NULL,
  rownumber = NULL,
  maxcols = 100,
  maxrows = 100,
  overwrite = FALSE,
  version = "3.30",
  verbose = TRUE
)

Arguments

dir

Directory with control file to change.

ctlfile

Control file name. Default="control.ss_new".

newctlfile

Name of new control file to be written. Default="control_modified.ss".

keyword

Keyword to use as reference for start of section on variance adjustments

newtable

Optional table of new variance adjustment values

newrow

Optional vector of new variance adjustment values for a particular row

rownumber

Which of the 6 rows to replace with 'newrow' if present?

maxcols

Maximum number of columns to search among in 3.24 models (may need to increase from default if you have a huge number of fleets)

maxrows

Maximum number of rows to search among in 3.30 models (may need to increase from default if you have a huge number of fleets)

overwrite

Overwrite file if it exists?

version

SS version number. Currently "3.24" or "3.30" are supported, either as character or numeric values (noting that numeric 3.30 = 3.3). version = NULL is no longer the default or an allowed entry. The default is version = "3.30".

verbose

TRUE/FALSE switch for amount of detail produced by function. Default=TRUE.

Author(s)

Ian G. Taylor, Gwladys I. Lambert

See Also

SS_tune_comps(), SS_parlines(), SS_changepars()

Examples

## Not run: 
# load model output into R
replist <- SS_output(dir = "c:/model/")

# get new variance adjustments (
varadjust <- SS_tune_comps(replist, option = "Francis")
print(varadjust)

# write new table to file
SS_varadjust(
  dir = replist[["inputs"]][["dir"]], newctlfile = "new_control.ss",
  newtable = varadjust, overwrite = FALSE
)

## End(Not run)


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