asymptor (version 0.2)

custom_lag: Lag a vector

Description

Lag a vector

Usage

custom_lag(x, k = 1)

Arguments

x

Vector (of any class).

k

Integer to specify the lag (defaults to 1).

Value

A lagged vector (not a time series as opposed to stats::lag()). The behaviour of this lag() function is closer to that of dplyr::lag().