timeSeq | R Documentation |
Constructs a regularly-spaced timeDate
object.
timeSeq(from, to, by = "days", length.out, k.by=1, align.by=FALSE, extend=FALSE, week.align=NULL, holidays, exceptions, additions, format, zone)
at least one of from
or to
is required, plus length.out
(the
desired length of the resulting sequence). Alternatively can be both from
and to
, in
which case if length.out
and by
are supplied, length.out
is ignored.
from |
the starting value of the sequence: a |
to |
the ending value of the sequence: a |
by |
the spacing between the successive values in the sequence. This can be
a "milliseconds" "seconds" "minutes" "hours" "days" "weekdays" "bizdays" "weeks" "months" "quarters" "years" |
length.out |
the length of the sequence before additions and exceptions are included. |
k.by |
a non-zero integer giving the width of the interval between consecutive
values in the sequence in terms of the units given in |
align.by |
a logical value. If |
extend |
a logical value. If |
week.align |
if This argument is ignored if
|
holidays |
the holidays for business day sequences (ignored if |
exceptions |
an event object giving any time periods when the sequence should have
no values. These are applied after the sequence is created from
from/to/by |
additions |
any additional times or dates to put in the sequence. |
format |
the time/date output format for printing. |
zone |
the time zone for the sequence. |
returns a time/date object as defined by the arguments.
seq
, timeAlign
, timeSequence
, format.timeDate
,
holidays
,
timeEvent
timeSeq("1/1/1992", "1/10/1992") timeSeq("1/1/1992", "12/1/1992", by = "months") timeSeq("1/3/1992", "12/5/1992", by = "months", align.by=TRUE) timeSeq("1/3/1992", "12/5/1992", by = "months", align.by=TRUE, extend=TRUE) timeSeq("1/1/1992", "1/31/1992", by = "weeks", align.by=TRUE, week.align="Mon") timeSeq("1/1/1992", "12/31/1992", by="weekdays", exceptions=holidays(1992)) timeSeq("1/1/1992", "1/1/1995", by="months", exceptions=timeEvent("1/1/1993", "12/31/1993")) ## subtract one day from a first-of-month sequence to create ## an end-of-month sequence timeSeq(from = "2/1/2003", to = "1/1/2004", by = "months" ) - 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.