Provides a lagging mechanism for vector data.
Examples
x = rnorm(10)
lagged(x, 2)
#> [1] NA NA -0.7356846 0.0972098 0.7642268 0.7857579
#> [7] 1.1820321 -0.9558760 -1.0316165 0.4336838
Provides a lagging mechanism for vector data.
x = rnorm(10)
lagged(x, 2)
#> [1] NA NA -0.7356846 0.0972098 0.7642268 0.7857579
#> [7] 1.1820321 -0.9558760 -1.0316165 0.4336838