change_f_par {ss3sim} | R Documentation |
Alter the fishing mortality (F) values in an SS3 .par
file.
Description
Takes an SS3 .par
file and changes the F values for specified years.
If used with run_ss3sim
the case file should be named
F
. A suggested (default) case letter is F
.
Usage
change_f_par(years, years_alter, fvals, par_file_in = "ss.par",
par_file_out = "ss.par")
Arguments
years |
*Vector of years for which F values are specified,
if there is more than one fleet or season the catches must be ordered by
season:year:fishery (e.g., season1year1fishery1, season2year1fishery1,
season1year2fishery1). The actual vector does not have to correspond to
true years but must be the correct length (e.g., instead of
|
years_alter |
*Vector of years for the which F values will be altered.
If there is more than one fishery or season, use the mapping system
created in |
fvals |
*Vector of F values to be entered into |
par_file_in |
A string providing the path to the input SS |
par_file_out |
A string providing the path to the output SS |
Value
A modified SS3 .par
file.
Which arguments to specifiy in case files
All function argument descriptions that start with an asterisk (*) will be passed
through the case files to run_ss3sim
. If one of these arguments
is not specified in a case file, then a value of NULL
will be passed,
which may or may not be an appropriate value. Other arguments will be ignored
if specified.
Author(s)
Curry James Cunningham
See Also
Other change functions: change_data
,
change_em_binning
, change_e
,
change_f
, change_o
,
change_retro
, change_tv
Examples
# Create a temporary folder for the output:
temp_path <- file.path(tempdir(), "ss3sim-f-example")
dir.create(temp_path, showWarnings = FALSE)
# Find the example .par file in the package data:
d <- system.file("extdata", package = "ss3sim")
par_file <- paste0(d, "/change_f/ss3.par")
change_f_par(years = 1:49, years_alter = 2, fvals = 9999, par_file_in =
par_file, par_file_out = paste0(temp_path, "/test.par"))