0
) and the species identifier to a
three letter identifier. To use one of the built-in model setups, use one
of cod
, sar
, or fla
for cod, sardine, or flatfish. An
example filename would be M1-sar.txt
or lcomp2-fla.txt
.create_argfiles(functions = c(`lcomp0-spp` = "sample_lcomp", `agecomp0-spp` =
"sample_agecomp", `index0-spp` = "sample_index", `F0-spp` = "change_f",
`R0-spp` = "change_retro", `E0-spp` = "change_e", `X0-spp` = "change_tv"),
ext = ".txt", delim = "; ", ignore = c("file", "dir", "make_plot"), ...)
".txt"
."; "
.grep
so can be part of an argument name.write.table
.c(1, 2, 4)
, or seq(1, 100)
or 1:100
or matrix()
. Character objects don't need to be
quoted. However, be careful not to use your delimiter (set up as a
semicolon) anywhere else in the file besides to denote columns.The function change_tv
is a special case. To pass arguments
to change_tv
through a run_ss3sim
: (1) create a
case file with an arbitrary letter not used elsewhere (anything but D, E,
F, or R) and include the line function_type; change_tv
in your case
file. For example, you might want to use M for natural mortality, S for
selectivity, or G for growth.
This function (create_argfiles
) automatically adds a line
function_type; change_tv
to the top of a case file X0-spp.txt
as a starting point for change_tv
.
create_argfiles()
# Some example input lines:
#
# year1; 1990
# years; 1990:2000
# years; c(1980, 1990, 1995)
# survey_type; fishery
Run the code above in your browser using DataLab