seq.clock_year_quarter_day {clock} | R Documentation |
Sequences: year-quarter-day
Description
This is a year-quarter-day method for the seq()
generic.
Sequences can only be generated for "year"
and "quarter"
precision
year-quarter-day vectors.
When calling seq()
, exactly two of the following must be specified:
-
to
-
by
Either
length.out
oralong.with
Usage
## S3 method for class 'clock_year_quarter_day'
seq(from, to = NULL, by = NULL, length.out = NULL, along.with = NULL, ...)
Arguments
from |
A
|
to |
A
|
by |
The unit to increment the sequence by. If If |
length.out |
The length of the resulting sequence. If specified, |
along.with |
A vector who's length determines the length of the resulting sequence. Equivalent to If specified, |
... |
These dots are for future extensions and must be empty. |
Value
A sequence with the type of from
.
Examples
# Quarterly sequence
x <- seq(year_quarter_day(2020, 1), year_quarter_day(2026, 3), by = 2)
x
# Which we can then set the day of the quarter of
set_day(x, "last")