om_comps: Generate composition data from atlantisom

View source: R/om_comps.R

om_compsR Documentation

Generate composition data from atlantisom

Description

#'@description A wrapper function to create survey and fishery compositional data for assessment input. Takes the output of om_species. Wrapper can generate replicates. Saves output as .rds Results for more than one survey are generated with multiple survey config files and saved as separate .rds files.

Usage

om_comps(
  usersurvey = usersurvey_file,
  userfishery = userfishery_file,
  omlist_ss,
  n_reps = n_reps,
  save = TRUE
)

Arguments

usersurvey

survey config file in format of /config/usersurvey.R

userfishery

fishery config file in format of /config/fisherycensus.R

omlist_ss

output of om_species

n_reps

number of replicate age, length, and weight-at-age compositions to be generated

A

logical value specifying if the function should save the output to the disk or not. The default is TRUE.

Value

Returns list objects containing dataframes of survey catch, length, and weight at age class and age:

  • survObsAgeComp, list of replicate dataframes of observed survey age comp (n fish)

  • survObsLenComp, list of replicate dataframes of observed survey length comp (n fish)

  • survObsWtAtAge, list of replicate dataframes of observed survey weight at age (avg wt)

  • fishObsAgeComp, list of replicate dataframes of observed fishery age comp (n fish)

  • fishObsLenComp, list of replicate dataframes of observed fishery length comp (n fish)

  • fishObsWtAtAge, list of replicate dataframes of observed fishery weight at age (avg wt)

  • survObsFullAgeComp, list of replicate dataframes of observed survey annual age comp (n fish)

  • fishObsFullAgeComp, list of replicate dataframes of observed fishery age comp (n fish)

  • survObsFullWtAtAge, list of replicate dataframes of observed survey weight at annual age (avg wt)

  • fishObsFullWtAtAge, list of replicate dataframes of observed fishery weight at annual age (avg wt)

,

Author(s)

Sarah Gaichas

See Also

Other wrapper functions: om_consindex(), om_diet(), om_index(), om_init(), om_species()

Examples

## Not run: 
# assuming CC3om is output of om_init(here("config/CC3config.r"))
# and CC3om_sardine <- om_species(c("Pacific_sardine"), CC3om)

CC3om_sard_comp <- om_comps(usersurvey = here("config/usersurvey.R"),
    userfishery = here("config/fisherycensus.R"),
    omlist_ss = CC3om_sardine,
    n_reps = 1,
    save = TRUE)


## End(Not run)

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