n.lag: Create n lags

Description Usage Arguments Value

View source: R/data_preparation.R

Description

A function to create 1 through n lags of a set of variables. Is used as a data preparation helper function and is called internally by forecast_univariate, forecast_multivariate, and forecast_combine.

Usage

1
n.lag(Data, lags, variables = NULL)

Arguments

Data

data.frame: data frame of variables to lag and a 'date' column

lags

int: number of lags to create

variables

string: vector of variable names to lag, default is all non-date variables

Value

data.frame


OOS documentation built on March 17, 2021, 5:08 p.m.