Filter WAStD turtledata to a season range

filter_wastd_turtledata_seasons(
  x,
  seasons = NULL,
  verbose = wastdr::get_wastdr_verbose()
)

Arguments

x

An object of class wastd_data as returned by download_wastd_turtledata.

seasons

(list of int) A list of seasons to filter the data by.

  • NULL (default): return data from all seasons.

  • list of numbers: return data from given seasons. E.g. c(2017, 2018, 2019) or 2017:2019 returns data from seasons 2017-18 through to 2019-20.

verbose

Whether to show debug messages. Default: wastdr::get_wastdr_verbose()

Value

An object of class wastd_data filtered to records within area_name and the list of seasons.

Examples

if (FALSE) {
data(wastd_data)
first_season <- wastd_data$areas$season[[1]]
wastd_data_filtered <- wastd_data %>%
  filter_wastd_turtledata_seasons(first_season)
wastd_data
wastd_data_filtered
unique(wastd_data_filtered$areas$season)
}