| seq.Date {base} | R Documentation |
The method for seq for date-time classes.
## S3 method for class 'Date': seq(from, to, by, length.out = NULL, along.with = NULL, ...)
from |
starting date. Required |
to |
end date. Optional. If supplied must be after from. |
by |
increment of the sequence. Optional. See Details. |
length.out |
integer, optional. desired length of the sequence. |
along.with |
take the length from the length of this argument. |
... |
arguments passed to or from other methods. |
by can be specified in several ways.
difftime
"day",
"week", "month" or "year". This can optionally be
preceded by an integer and a space, or followed by "s".
A vector of class "Date".
## first days of years
seq(as.Date("1910/1/1"), as.Date("1999/1/1"), "years")
## by month
seq(as.Date("2000/1/1"), by="month", length=12)
## quarters
seq(as.Date("2000/1/1"), as.Date("2003/1/1"), by="3 months")