read_savedfisheries: Read saved fishery outputs into R object

View source: R/read_savedfisheries.R

read_savedfisheriesR Documentation

Read saved fishery outputs into R object

Description

A function to read fishery 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 fishery output files are stored and the type of fishery output file to be read in.

Usage

read_savedfisheries(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 will allow for multiple fisheries. Users must define a fishery.name in each fishery config file which is used to name the file that is output by each fishery function, and is then read back in to name list output for each fishery in the saved .rds file.

Author(s)

Sarah Gaichas

See Also

Other read functions: read_savedsurvs()

Examples

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

catchbio <- read_savedfisheries(d.name, 'Catch') # total fishery catch in tons
fish_age_comp_data <- read_savedfisheries(d.name, 'catchAge') # fishery age class composition
catchlen <- read_savedfisheries(d.name, "catchLen") # fishery length composition
fish)wtage <- read_savedfisheries(d.name, 'catchWtage') # fishery weight at age class
fish_annage_comp_data <- read_savedfisheries(d.name, 'catchAnnAge') # fishery annual age composition
fish_annage_wtage <- read_savedfisheries(d.name, 'catchAnnWtage') # fishery weight at annual age


## End(Not run)


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