change_e | R Documentation |
Takes Stock Synthesis
.ctl
and forecast.ss
files, along with
a list structure which houses the data file as read in by
r4ss::SS_readdat()
and changes which parameters are estimated, how natural mortality is
estimated, and if forecasts are performed. The function can be called by
itself or within run_ss3sim()
to alter an estimation model
.ctl
file.
change_e(
ctl_file_in = "em.ctl",
ctl_file_out = "em.ctl",
dat_list = NULL,
for_file_in = "forecasts.ss",
par_name = NULL,
par_int = "NA",
par_phase = "NA",
forecast_num = 0,
verbose = FALSE
)
ctl_file_in |
A string providing the path to the input Stock Synthesis |
ctl_file_out |
A string providing the path to the output Stock Synthesis control file. If the value is |
dat_list |
A Stock Synthesis data list object as read in from
|
for_file_in |
A string providing the path to the input SS
|
par_name |
A vector of character values corresponding to parameter
names that you wish to initialize at different values or change the phase
in which they are estimated. Entries are searched for in
|
par_int |
A vector of initial values, one for each entry in
|
par_phase |
A vector of phase values, one for each parameter in
|
forecast_num |
Number of years to perform forecasts. For those years,
the data will be removed from the |
verbose |
When |
Altered versions of Stock Synthesis .ctl
and forecast.ss
files are written
to the disk and the altered dat_list
is returned invisibly.
Kelli F. Johnson
Other change functions:
change_data()
,
change_em_binning()
,
change_f()
,
change_o()
,
change_retro()
,
change_tv()
d <- system.file("extdata", "models", "cod-om", package = "ss3sim")
change_e(
ctl_file_in = file.path(d, "codOM.ctl"),
ctl_file_out = file.path(tempdir(), "change_e.ctl"),
dat_list = codomdat,
for_file_in = file.path(d, "forecast.ss"),
par_name = c("_steep", "Size_DblN_peak_Fishery(1)"),
par_int = c(0.3, 40), par_phase = c(3, 2),
forecast_num = 0
)
# clean up the temporary files
file.remove(file.path(tempdir(), "change_e.ctl"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.