View source: R/utils-pull-survey-.R
pull_survey_age_proportions | R Documentation |
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_survey_age_proportions(
year = hake::get_data_yr(),
round = options()$digits,
dir =
"//nwcfile/fram/Survey.Acoustics/Survey Time Series Analysis/Historical Summary (for Kriging)/Outputs/Historical Outputs (KS Stratification with aged data)/with extrapolation/"
)
year |
An integer specifying the year of interest.
The default uses |
round |
An integer specifying how many digits should be printed.
The default is to print the options for |
dir |
The directory that stores the age-composition data that have been extrapolated. |
proportions <- pull_survey_age_proportions(
year = 2021, round = 2
)
# Values to paste into .dat file
glue::glue_collapse(proportions, sep = " ")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.