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


tylerJPike/OOS documentation built on March 20, 2021, 3:20 a.m.