Description Usage Arguments Value Note Author(s) See Also Examples
Similar to the lag
function from the stats package, but glag enables padding (e.g. NAs or 0s) of the lost entries. Contrary to the lag
function in the stats package, however, the default in glag is to pad (with NAs). The glag is particularly suited for zoo objects, since their indexing is retained
1 |
x |
a numeric vector or matrix |
k |
integer equal to the lag (the default is 1) |
pad |
logical. If TRUE (default), then the lost entries are padded with pad.value. If FALSE, then no padding is undertaken |
pad.value |
the pad-value |
A vector or matrix with the lagged values
Empty
Genaro Sucarrat, http://www.sucarrat.net/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.