date_seq | R Documentation |
date_seq()
generates a date (Date) or date-time (POSIXct/POSIXlt) sequence.
There are separate help pages for generating sequences for dates and date-times:
dates (Date)
date-times (POSIXct/POSIXlt)
date_seq(from, ..., to = NULL, by = NULL, total_size = NULL)
from |
A date or date-time to start the sequence from. |
... |
These dots are for future extensions and must be empty. |
to |
A date or date-time to stop the sequence at.
|
by |
The unit to increment the sequence by. |
total_size |
The size of the resulting sequence. If specified alongside |
A date or date-time vector.
# See method specific documentation for more examples
x <- as.Date("2019-01-01")
date_seq(x, by = duration_months(2), total_size = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.