timeBasedSeq(x, retclass = NULL, length.out = NULL)seq internallyIf retclass is NULL, the result is a named
list of from, to, by and length.out.
In general, the format is a string specifying
a time and/or date from, to, and
optionally by delineated by
either
The general form is from/to/by or from::to::by, where to and by are optional if the length.out arg is specified.
The from and to elements of the string
must be left-specified with respect to the standard
CCYYMMDD HHMMSS form. All dates-times
specified will be set to either the earliest point (from)
or the latest (to), given the level of specificity.
For example
The level of detail in the request is interpretted as the level of detail in the result. The maximum detail of either from or to is the basis of the sequence, unless the optional by element is specified, which will be covered later.
To request a yearly series, it is only necessary to
use yearmon) with
Using the optional third by field (the third
delimited element to the string), will override the
granularity intepretation and return the requested
periodicity. The acceptable arguments include
Y for years, m for months, d for
days, H for hours, M for minutes and S for
seconds.
timeBased, xtstimeBasedSeq('1999/2008')
timeBasedSeq('199901/2008')
timeBasedSeq('199901/2008/d')
timeBasedSeq('20080101 0830',length=100) # 100 minutes
timeBasedSeq('20080101 083000',length=100) # 100 secondsRun the code above in your browser using DataLab