View source: R/utils-pad-weight-at-age.R
pad_weight_at_age | R Documentation |
Fill in necessary years of weight-at-age file
pad_weight_at_age(
data,
n_forecast_years = 5,
n_years_used_for_forecast = 5,
year_global_average = -1940,
ages = 0:20
)
data |
A data frame of weight-at-age data in long form where the
weight-at-age information is stored in a column called |
n_forecast_years |
An integer specifying the number of forecast years you want to extend the time series by. |
n_years_used_for_forecast |
An integer specifying the number of years of data that you want to average over for the forecast period. |
year_global_average |
A four digit integer, typically |
ages |
A vector of integers specifying the ages you want in your file. If there are no ages in the data to represent the older ages present in vector, then the information for the oldest age will be repeated for any given year. |
Note that this function can also be used to pad maturity information such that it has the same format as the weight-at-age information allowing for the multiplication of maturity by weight at age to get fecundity.
A data frame of weight-at-age information is returned that can immediately
be passed to r4ss::SS_writewtatage()
.
Kelli F. Johnson
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.