Skip to contents

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.

Usage

SS_parlines(
  ctlfile = "control.ss_new",
  dir = NULL,
  version = "3.30",
  verbose = TRUE,
  active = FALSE
)

Arguments

ctlfile

File name of control file including path.

dir

A file path to the directory of interest. When omitted, functions typically default to the current working directory or the model directory stored in replist.

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

A logical value specifying if output should be printed to the screen.

active

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

Details

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

Author

Ian Taylor

Examples

if (FALSE) { # \dontrun{
ctlfile <- file.path(system.file("extdata", "simple_small", package = "r4ss"), "control.ss_new")
parlines <- SS_parlines(ctlfile = ctlfile)
head(parlines)
#       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
} # }