data.list {onlineforecast} | R Documentation |
Make a data.list
Description
Make a data.list of the vectors and data.frames given.
Usage
data.list(...)
Arguments
... |
Should hold: time t, observations as vectors and forecasts as data.frames |
Details
See the vignette 'setup-data' on how a data.list must be setup.
It's simply a list of class data.list
holding:
- vector t
- vector(s) of observations
- data.frames (or matrices) of forecast inputs
Value
a data.list.
Examples
# Put together a data.list
# The time vector
time <- seq(ct("2019-01-01"),ct("2019-01-02"),by=3600)
# Observations time series (as vector)
xobs <- rnorm(length(time))
# Forecast input as a data.frame with columns names 'kxx', where 'xx' is the horizon
X <- data.frame(matrix(rnorm(length(time)*3), ncol=3))
names(X) <- pst("k",1:3)
D <- data.list(t=time, xobs=xobs, X=X)
# Check it (see \code{?\link{summary.data.list}})
summary(D)
[Package onlineforecast version 1.0.2 Index]