alma_seq: Generate date sequences

View source: R/alma-seq.R

alma_seqR Documentation

Generate date sequences

Description

alma_seq() generates a sequence of all dates between from and to, skipping any events defined by the rschedule.

Usage

alma_seq(from, to, rschedule, inclusive = TRUE)

Arguments

from, to

⁠[Date(1)]⁠

Dates defining the range to look for events.

rschedule

⁠[rschedule]⁠

An rschedule, such as an rrule, runion, rintersect, or rsetdiff.

inclusive

⁠[logical(1)]⁠

If from or to are events in the rschedule, should they be removed from the sequence?

Value

A vector of dates in the range of ⁠[from, to]⁠, with all events in the rschedule removed.

Examples

on_weekends <- weekly() %>% recur_on_weekends()

# Generate a sequence of all non-weekend dates in Jan-2000
alma_seq("2000-01-01", "2000-01-31", on_weekends)

almanac documentation built on April 14, 2023, 12:23 a.m.