Learn R Programming

onlineforecast (version 0.9.3)

data.list: 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

Value

a data.list.

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

Examples

Run this code
# NOT RUN {
# 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 data.frame
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
check(D)

# }

Run the code above in your browser using DataLab