Skip to contents

Filter holidays by category

Usage

filter_holidays(data, types)

Arguments

data

a data.frame with at least the following column: type, the category of the holiday. Typically, the output of get_holidays().

types

a character with the types of holidays to keep. See get_holiday_types().

Value

A data.frame, same as the input but with only holidays matching the type category.

Examples

if (FALSE) {
## Get holidays for United Kingdom in 2024 ----
holidays <- get_holidays(country = "UK", year = 2024, month = 4)

## Get types of holidays ----
get_holiday_types(holidays)

## Filter holidays ----
filter_holidays(holidays, types = "Common Local Holiday")
}