Function that retrieves age and length pop'n numbers for AFSC stock assessments

get_popn(
  species = 21720,
  region = "goa",
  comp = "age",
  sex_cat = 4,
  spec_case = NULL
)

Arguments

species

AFSC species code (default = 21720, pacific cod)

region

survey region. options are 'ai', 'ebs', 'ebs_slope', 'goa', and 'nebs' (default = 'goa')

comp

type of pop'n numbers desired, options are 'age' and 'length'

sex_cat

sex category for which pop'n numbers desired. options are 0 (sexes combined pre-expansion), 1 (males), 2 (females), 3 (unsexed), and 4 (sexes combined post-expansion) (default = 4)

spec_case

description string if getting pop'n numbers for special case. options are 'ai_subreg', 'bsre', 'dr', 'rebs', 'w_c_egoa', 'w140', 'wc_egoa' (default = NULL)

Value

a dataframe of age or length pop'n numbers (note that age data also include mean and sd in length-at-age)