in_quarter: Specify the quarter(s) of a schedule

View source: R/quarter.R

in_quarterR Documentation

Specify the quarter(s) of a schedule

Description

Creates a schedule of events occurring in the quarters or semester specified.

Usage

in_quarter(..., fiscal_start = 1)

in_semester(x)

Arguments

...

A numeric vector of quarter specifications.

fiscal_start

For fiscal quarters, a numeric indicating the starting month of a fiscal year. Defaults to 1 (January).

x

Numeric specifying which semester the events occur in (1 or 2).

Value

A schedule object.

Examples

 my_dates <- seq.Date(from = as.Date("2000-01-01"),
                     to = as.Date("2000-12-01"),
                     by = "1 month")

happen(in_quarter(1), my_dates)

happen(in_quarter(1, 3), my_dates)

happen(in_quarter(1:3), my_dates)

happen(in_quarter(1, 3, fiscal_start = 2), my_dates)

happen(in_semester(2), my_dates)

jameslairdsmith/scheduler documentation built on July 27, 2023, 6:06 p.m.