seq.POSIXt {base} | R Documentation |
The methodw for seq
for date-time classes
## S3 method for class 'POSIXt': 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
"sec"
,
"min"
, "hour"
, "day"
, "DSTday"
,
"week"
, "month"
or "year"
. This can optionally be
preceded by an integer and a space, or followed by "s"
.
The difference between "day"
and "DSTday"
is that the
former ignores changes to/from daylight savings time and the latter takes
the same clock time each day. ("week"
ignores DST, but
"7 DSTdays"
) can be used as an alternative. "month"
and
"year"
allow for DST as from R 1.5.0.)
A vector of class "POSIXct"
.
## first days of years seq(ISOdate(1910,1,1), ISOdate(1999,1,1), "years") ## by month seq(ISOdate(2000,1,1), by="month", length=12) ## quarters seq(ISOdate(1990,1,1), ISOdate(2000,1,1), by="3 months") ## days vs DSTdays seq(ISOdate(2000,3,20), by="day", length = 10) seq(ISOdate(2000,3,20), by="DSTday", length = 10) seq(ISOdate(2000,3,20), by="7 DSTdays", length = 4)