get_mod: get directory for a lingcod model

View source: R/get_mod.R

get_modR Documentation

get directory for a lingcod model

Description

reads model output from a directory found by get_dir_ling() and invisibly returns the list created by r4ss::SS_output().

Usage

get_mod(
  area = NULL,
  num = NULL,
  sens = 1,
  yr = 2021,
  id = NULL,
  dir = NULL,
  covar = TRUE,
  assign = TRUE,
  printstats = FALSE,
  plot = FALSE,
  verbose = TRUE,
  ...
)

Arguments

area

area, initially either "n" or "s" for 2021 models

num

base model number

sens

sensitivity number (assumed 1 if not specified)

yr

model year (assumed 2021 if not specified)

id

model id (like "2021.s.001.001") as an alternative to the combination of inputs area, num, sens, and year

dir

Directory where model files are located as an alternative to the previous inputs

covar

Read covar.sso file? Passed to r4ss::SS_output() and required in some cases where there was a non-positive-definite Hessian.

assign

Assign the result of r4ss::SS_output() to the user's workspace with the name mod.[id] (e.g. mod.2021.s.002.001).

printstats

Argument passed on r4ss::SS_output()

plot

Either TRUE/FALSE or a vector drawn from 1:26 passed to SS_plots() to control which plot groups get created

verbose

A logical value specifying if output should be printed to the console or not. The default is FALSE, which will suppress messages.

dots

Additional arguments passed to r4ss::SS_plots()

Value

invisibly returns the list created by r4ss::SS_output() while also optionally assigning that list to the workspace (if assign = TRUE).

Author(s)

Ian G. Taylor

See Also

get_dir_ling(), get_inputs_ling()

Examples

## Not run: 
  # read model output and assign to workspace as 'mod.2021.s.001.001"
  get_mod(area ="s", num = 1)
  get_mod(id = "2021.s.001.001")

  # read model output and make all default r4ss plots
  get_mod(area ="s", num = 2, plot = TRUE)

  # read model output and make only biology, selex, and time series plots
  get_mod(area ="s", num = 2, plot = 1:3)

## End(Not run)

iantaylor-NOAA/Lingcod_2021 documentation built on Oct. 30, 2024, 6:42 p.m.