SS_changepars: Change parameters in the control file.

Description Usage Arguments Author(s) See Also Examples

View source: R/SS_changepars.R

Description

A function to take advantage of SS_parlines that could be used to create a series of control files with different parameter values. This is used by SS_profile, but may also be useful for simulation work.

Usage

1
2
3
4
SS_changepars(dir = "C:/myfiles/mymodels/myrun/",
ctlfile = "control.ss_new", newctlfile = "control_modified.ss",
linenums = NULL, strings = NULL, newvals = NULL, estimate = FALSE,
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".

linenums

Line numbers of control file to be modified. Either this or the Strings input are needed. Default=NULL.

strings

Strings (with optional partial matching) indicating which parameters to be modified. This is an alternative to linenums. Strings correspond to the commented parameter names included in control.ss_new, or whatever is written as comment at the end of the 14 number parameter lines. Default=NULL.

newvals

Vector of new parameter values. Default=NULL.

estimate

Vector of TRUE/FALSE for which changed parameters are to be estimated. Default=FALSE.

verbose

More detailed output to command line. Default=TRUE.

Author(s)

Ian Taylor

See Also

SS_parlines, SS_profile

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
SS_changepars(dir='Y:/ss/SSv3.03a/Simple/',ctlfile='Control.SS_New',
              strings=c('SR_steep','SR_sigmaR'),newvals=c(.35,.6))
# [1] wrote new file to Control_Modified.SS
#    oldvals newvals oldphase newphase     comment
# 1 0.609048    0.35        4       -4  # SR_steep
# 2 0.600000    0.60       -4       -4 # SR_sigmaR

## End(Not run)

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