Description Usage Arguments Examples
using three of the four from
, to
, by
,
length.out
parameters, creates a data.frame that satisfies the
requirements for a time series set. any extra data is considered a
measurement column and added in the standard R fashion.
the returned data.frame has at least the column timestamps
.
the first timestamp is equal to from
, the last is equal or less
than to
, the distance between two subsequent timestamps is
by
, there are length.out
elements (length.out - 1
steps of distance by
).
data may be specified as numeric, in which case it is considered
indicating minutes, or as POSIXct
objects.
1 | timeseries(from, to, by, length.out, order.by, ...)
|
from |
the starting instant of the resulting time series.
either |
to |
the ending instant of the resulting time series. either
|
by |
the timestep in the timeseries. either a |
length.out |
if specified, ensures the resulting timeseries
contains |
order.by |
if specified, the resulting timeseries uses these timestamps as index instead of building its own from the above described four parameters. |
... |
any other named field is added as field in the resulting
timeseries. the lenght must match the |
1 2 | firstminutes <- timeseries(0, 1000, by=50, constant=355/113)
uptomidnight <- timeseries(to=Sys.Date(), by=90, length.out=5, countdown=4:0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.