make_input: Make a forecast matrix (as data.frame) from observations.

View source: R/make_input.R

make_inputR Documentation

Make a forecast matrix (as data.frame) from observations.

Description

This function creates a data.frame with columns for each horizon such that it can be added to a data.list and used in a forecast model.

Usage

make_input(observations, kseq)

Arguments

observations

vector of observations.

kseq

vector of integers, respresenting the desired "k-steps ahead".

Value

Returns a forecast matrix (as a data.frame) with simply the observation vector copied to each column.

Examples


# Data for example
D <- subset(Dbuilding, c("2010-12-15","2010-12-20"))

# Generate the input
make_input(D$heatload, 1:4)

# Set is in D, such that it can be used in input expressions (e.g. by model$add_inputs(AR = "Ar0")
D$AR0 <- make_input(D$heatload, 1:36)


onlineforecast documentation built on Oct. 12, 2023, 5:15 p.m.