SS_read | R Documentation |
Read all the input files for a Stock Synthesis model into R as a list object.
These files will be in a single directory on your machine, i.e., dir
.
Functionality comes from the r4ss::SS_read*()
functions.
This function simplifies the number of lines of code you need to write by
using all of the read functions to read in the
starter, control, data, and forecast files.
The starter file is helpful because it provides names for the
control and data files.
SS_read(dir = NULL, ss_new = FALSE, verbose = FALSE)
dir |
A file path to the directory of interest.
Typically used with |
ss_new |
A logical that controls if the |
verbose |
A logical value specifying if output should be printed to the screen. |
An invisible list is returned.
The first element is the directory that was provided in the argument dir
.
The second element is the result of normalizePath(dir)
,
which gives the full path.
The remaining four elements are list objects from reading in
the following input files:
data
control
starter
forecast
wtatage (will be NULL if not required by the model)
Ian G. Taylor, Kelli F. Johnson
SS_write()
can be used to write the input files using the list
created by this function.
SS_readstarter()
, SS_readdat()
, SS_readctl()
,
SS_readforecast()
, and SS_readwtatage()
are used by this
function to read in the input files.
SS_output()
to read in equivalent SS3 output files.
# Read in the 'simple' example model stored in {r4ss} inputs <- SS_read( dir = system.file("extdata", "simple_3.30.13", package = "r4ss") )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.