cvd_time_period_list {cvdprevent} | R Documentation |
List time periods
Description
Returns all available time periods
Usage
cvd_time_period_list(indicator_type_id)
Arguments
indicator_type_id |
integer - Indicator type ID, e.g. standard or outcome indicator type. If passed will show time periods containing data of the given type (optional) |
Details
CVD Prevent API documentation: Time period
Value
Tibble of time period details
See Also
cvd_indicator_types()
, cvd_time_period_system_levels()
Examples
# NB, the following examples are not tested because they take longer than
# expected to return the results
# get a tibble of all periods
cvd_time_periods <- cvd_time_period_list()
# filter for the latest four periods
cvd_time_period_list() |>
dplyr::filter(IndicatorTypeName == 'Standard') |>
dplyr::slice_max(order_by = TimePeriodID, n = 4) |>
dplyr::select(TimePeriodID, TimePeriodName)
[Package cvdprevent version 0.2.0 Index]