tidy_cal | R Documentation |
Generate length-at-age or catch-at-age data
tidy_cal(dat, yrs, unsorted_only = TRUE, interval = 1, sex = c(1, 2))
tidy_caa(dat, yrs, unsorted_only = FALSE, interval = 1, sex = c(1, 2))
dat |
Commercial or biological samples from |
yrs |
A complete set of years to include in the matrix. |
unsorted_only |
Logical for whether to only include the unsorted samples. Only applies to the commercial data. |
interval |
Interval for the complete set of ages or lengths. For example,
for length bins of interval 2, |
sex |
Numeric vector indicating males and/or or females. |
A catch at age or catch at length matrix as an array. 1 x nyears x nage/nlength
## Not run:
d_commercial <- gfdata::get_commercial_samples(222)
cal <- tidy_cal(d_commercial, yrs = 2005:2010, interval = 5)
d_survey <- gfdata::get_survey_samples(222, ssid = 1)
caa <- tidy_caa(d_survey, yrs = 2010:2012)
caa[1, , ]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.