Tidy PBS samples data for plot_sample_avail()

tidy_sample_avail(dat, year_range = NULL, ageing_method_codes = NULL)

Arguments

dat

Input data frame from get_survey_samples().

year_range

Either NULL, in which case all years are returned, or a numeric vector of length two giving the lower and upper years to include.

ageing_method_codes

A numeric vector of ageing method codes to filter on. Default to NULL, which brings in all valid ageing codes. See get_age_methods().

Examples

# NOT RUN {
d <- get_survey_samples("lingcod")
tidy_sample_avail(d)

d <- get_commercial_samples("lingcod")
tidy_sample_avail(d)
# }