SS_parlines: Get parameter lines from Stock Synthesis control file

Description Usage Arguments Author(s) See Also Examples

View source: R/SS_parlines.R

Description

A simple function which takes as input the full path and filename of a control file for input to Stock Synthesis. Ideally, a Control.SS_New file will be used, so that it represents what SS thinks the inputs are, and not what the user thinks the inputs are.

It returns a table which should contain one line for each parameter in the model. Currently, only the first 7 values are returned, because all parameters have those values. In the future, extended parameter lines could be returned.

Parameter lines are identified as those which have 7 or 14 numeric elements followed by a non-numeric element. It's possible that this system could break down under certain circumstances

Usage

1
2
  SS_parlines(ctlfile = "C:/myfiles/mymodels/myrun/control.ss_new",
  dir=NULL, verbose = T, active = F)

Arguments

ctlfile

File name of control file including path.

dir

Alternative input of path, where file is assumed to be "control.ss_new". Default=NULL.

verbose

T/F switch for amount of detail produced by function. Default=T.

active

Should only active parameters (those with positive phase) be output? Default=F.

Author(s)

Ian Taylor

See Also

SS_changepars

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
x <- SS_parlines(ctlfile='Y:/ss/SSv3.03a/Simple/Control.SS_New')
head(x)
#       LO    HI     INIT PRIOR PR_type   SD PHASE              Label Line_num
# 42  0.05  0.15  0.10000  0.10       0  0.8    -3  NatM_p_1_Fem_GP_1       42
# 43  0.05  0.15  0.10000  0.10       0  0.8    -3  NatM_p_2_Fem_GP_1       43
# 44  1.00 45.00 32.28100 36.00       0 10.0     2 L_at_Amin_Fem_GP_1       44
# 45 40.00 90.00 71.34260 70.00       0 10.0     4 L_at_Amax_Fem_GP_1       45
# 46  0.05  0.25  0.15199  0.15       0  0.8     4 VonBert_K_Fem_GP_1       46
# 47  0.05  0.25  0.10000  0.10       0  0.8    -3  CV_young_Fem_GP_1       47

## End(Not run)

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