read_savedsurvs: Read saved survey outputs into R object

View source: R/read_savedsurvs.R

read_savedsurvsR Documentation

Read saved survey outputs into R object

Description

A function to read survey index and composition data saved as .rds into an R object with the same structure as the output of om_species or om_comps. Users must enter the path where the survey output files are stored and the type of survey output file to be read in.

Usage

read_savedsurvs(dir, type)

Arguments

dir

The directory of the atlantis model output, where the default is getwd().

type

A variable passed to read_savedsurvs to determine the type of survey output to be read in. Must take one of these values:

  • survB

  • survAge

  • survLen

  • survWtage

  • survAnnAge

  • survAnnWtage

Details

om_species, om_comps, and om_diet allow for multiple surveys. Users must define a survey.name in each survey config file which is used to name the file that is output by each survey function, and is then read back in to name list output for each survey in the saved .rds file.

Author(s)

Sarah Gaichas

See Also

Other read functions: read_savedfisheries()

Examples

## Not run: 
# assuming d.name is the path where atlantisom output is stored

survObsBiom <- read_savedsurvs(d.name, 'survB') # survey biomass index
age_comp_data <- read_savedsurvs(d.name, 'survAge') # survey age class composition
len_comp_data <- read_savedsurvs(d.name, 'survLen') # survey length composition
wtage <- read_savedsurvs(d.name, 'survWtage') # survey weight at age class
annage_comp_data <- read_savedsurvs(d.name, 'survAnnAge') # survey annual age composition
annage_wtage <- read_savedsurvs(d.name, 'survAnnWtage') # survey weight at annual age


## End(Not run)


r4atlantis/atlantisom documentation built on Nov. 12, 2023, 2:59 a.m.