Calculate age proportions for the acoustic age-2+ survey based on the estimated abundance at age extrapolated to the KS stratifications. This information is produced by the acoustic team and stored on the network in the kriged_len_age_abundance_table file. The original code to generate these proportions was provided by Allan Hicks and can be found on GitHub https://github.com/iantaylor-NOAA/hake-data/blob/master/Rcode/AcousticData2.R. Particularly lines 170-174 that explains the file location. The actual code to compute the compositions is pretty trivial, the difficulty is knowing what file to use. As mentioned above, abundance is key here rather than biomass.

pull_surveyageproportions(year = hakedata_year(), round = options()$digits)

Arguments

year

An integer specifying the year of interest. The default uses hakedata_year() to get the current year for the data.

round

An integer specifying how many digits should be printed. The default is to print the options for digits stored in your R session.

Examples

proportions <- pull_surveyageproportions(
  year = 2021, round = 2
)
#> Error in pull_surveyageproportions(year = 2021, round = 2): could not find function "pull_surveyageproportions"
# Values to paste into .dat file
glue::glue_collapse(proportions, sep = " ")
#> Warning: is.na() applied to non-(list or vector) of type 'closure'
#> Error in paste0(x, collapse = sep): cannot coerce type 'closure' to vector of type 'character'