lagged: Create a k-lagged time series

Description Usage Arguments Value Examples

View source: R/lagged.r

Description

Helper function to create a lagged version of a vector.

Usage

1
lagged(x, k)

Arguments

x

a vector

k

the lag to use

Value

A lagged version of the vector

Examples

1
2
3
lagged(1:10, 1)
lagged(1:10, -1)
lagged(1:10, 0)

eeholmes/SardineForecast documentation built on July 17, 2021, 2:56 a.m.