pbsLag | R Documentation |
Return a Lagged Matrix
pbsLag(x, n = 1)
x |
[matrix()] A vector or column matrix |
n |
[integer()] The lag sizes |
A matrix or vector. If 'x' is a vector then returns a vector 'length(x)' with 'NA' for the first 'n' values then the first 'length(x) - n' values of 'x'.
pbsLag(1:10, 3)
pbsLag(matrix(rep(1:10, 2), nrow = 10), 3)
pbsLag(matrix(rep(1:10, 2), nrow = 10), c(3, 5))
pbsLag(matrix(rep(1:10, 2), nrow = 10), c(0, 1))
pbsLag(matrix(rep(1:10, 2), nrow = 10), c(0, 0))
pbsLag(matrix(rep(1:10, 2), nrow = 10), c(0, -1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.