View source: R/gregorian-year-month-weekday.R
seq.clock_year_month_weekday | R Documentation |
This is a year-month-weekday method for the seq()
generic.
Sequences can only be generated for "year"
and "month"
precision
year-month-weekday vectors.
When calling seq()
, exactly two of the following must be specified:
to
by
Either length.out
or along.with
## S3 method for class 'clock_year_month_weekday'
seq(from, to = NULL, by = NULL, length.out = NULL, along.with = NULL, ...)
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. |
A sequence with the type of from
.
# Monthly sequence
x <- seq(year_month_weekday(2019, 1), year_month_weekday(2020, 12), by = 1)
x
# Which we can then set the indexed weekday of
set_day(x, clock_weekdays$sunday, index = "last")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.