process_weight_at_age.Rd
Create weight-at-age files for the hake stock assessment. Updated csv or rds files must exist prior to running.
process_weight_at_age(
dir = hakedata_wd(),
maxage = 15,
yrs = 2008:hakedata_year(),
navgyears = 5,
nforecast = 4,
maturity = maturity_at_age
)
The directory where the data is stored.
It can either be relative or absolute because the working
directory will not be changed. Instead, dir
is
used to import data and export results to.
The age of the plus group used for the stock assessment. This will correspond to the maximum age group in the data, not in the model because SS can model many ages when there is only information in the data for a few ages.
A vector of years to search for recent data. Typically,
the vector starts with 2008 and ends with the most recent year
of data. This will allow files created from process_weight_at_age_US()
to
be included in the analysis, i.e., recent US data. Typically, you
should not have to change this value from the default entry.
The number of early and late years to average since
1975 and max(yrs)
for the early and late analysis asked for
by the Scientific Review Group in 2017. The argument can be a single
value or a vector of two values, where in the latter case the second
value will be used for the most recent time period.
The number of years to forecast into the future. Typically, this is three for the hake assessment and will lead to this many rows of mean weight-at-age data being copied to the data frame beyond the last year of empirical data.
A vector of maturity values from the maturity ogive. The length needs to be the same as the number of ages in the model, not the number of ages in the data. The default is to use the maturity ogive stored in the package.
todo: document return