View source: R/write_inputs_ling.R
write_inputs_ling | R Documentation |
writes SS input files using the list created by get_inputs_ling()
(presumably after modification of one or more elements)
using the r4ss::SS_write*()
functions for the four model input files.
write_inputs_ling(
inputs,
dir = NULL,
files = c("dat", "ctl", "start", "fore"),
datname = "ling_data.ss",
ctlname = "ling_control.ss",
startname = "starter.ss",
forename = "forecast.ss",
overwrite = TRUE,
verbose = FALSE
)
inputs |
list created by |
dir |
model directory (like "models/2021.s.001.001_new_fleets").
The |
files |
vector of file types to write (default is four standard input files–.par file not yet supported) |
datname |
name of data file to write |
ctlname |
name of control file to write |
startname |
name of starter file to write |
forename |
name of forecast file to write |
Ian G. Taylor
get_inputs_ling()
,
## Not run:
# read inputs
inputs <- get_inputs_ling(area ="s", num = 99)
# add new data
inputs_with_x_changes <- inputs
inputs_with_x_changes$dat <- add_data(inputs$dat, area = "s")
# write the files back to the source directory
write_inputs_ling(inputs = inputs_with_x_changes,
dir = "models/2021.s.099.001_with_x_changes",
files = "start")
# read inputs
inputs <- get_inputs_ling(area ="s", num = 99)
# make small change (e.g. use the .par file)
inputs$start$init_values_src <- 1
# write the files back to the source directory
write_inputs_ling(inputs = inputs,
dir = inputs$dir,
files = "start")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.