Learn R Programming

onlineforecast (version 1.0.2)

as.data.frame.data.list: Convert to data.frame

Description

Converts a data.list to a data.frame.

Usage

# S3 method for data.list
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

Value

A data.frame

Arguments

x

The data.list to be converted.

row.names

Not used.

optional

Not used.

...

Not used.

Details

The forecasts in the data.list will result in columns named varname.kxx in the data.frame.

Examples

Run this code

#' # Use the data.list with building heat load 
D <- Dbuilding
# Take a subset
D <- subset(D, 1:5, nms=c("t","Taobs","Ta","Iobs","I"), kseq=1:3)

# Convert to a data.frame, note the names of the forecasts are appended .kxx (i.e. for Ta and I)
as.data.frame(D)

Run the code above in your browser using DataLab