alma_in() checks if x is in the event set of dates defined by the rschedule.

alma_in(x, rschedule)

Arguments

x

[Date]

A vector of dates.

rschedule

[rschedule]

An rschedule, such as an rrule or rbundle.

Value

A logical vector the same size as x.

Examples

rrule <- weekly() %>% recur_on_wday("Thursday") # A Thursday and Friday x <- as.Date("1970-01-01") + 0:1 alma_in(x, rrule)
#> [1] TRUE FALSE
# Every month, on the 2nd day of the month rrule2 <- monthly() %>% recur_on_mday(2) # Make a larger rbundle made of multiple rules rb <- runion() %>% add_rschedule(rrule) %>% add_rschedule(rrule2) alma_in(x, rb)
#> [1] TRUE TRUE