Description Usage Arguments Details Value Note See Also Examples
Methods for computing lags and differences of "zoo" objects.
1 2 3 4 |
x |
a |
k, lag |
For |
differences |
an integer indicating the order of the difference. |
arithmetic |
logical. Should arithmetic (or geometric) differences be computed? |
na.pad |
logical. If |
... |
currently not used. |
These methods for "zoo" objects behave analogously to the default
methods. The only additional arguments are arithmetic in diff
na.pad in lag.zoo which can also be specified in diff.zoo
as part of the dots.
Also, "k" can be a vector of lags in which case the names of
"k", if any, are used in naming the result.
The lagged or differenced "zoo" object.
Note the sign of k: a series lagged by a positive k
is shifted earlier in time.
lag.zoo and lag.zooreg can give different results.
For a lag of 1 lag.zoo moves points to the adjacent time point
whereas lag.zooreg moves the time by deltat. This
implies that a point in a zoo series cannot be lagged to a time
point that is not already in the series whereas this is possible for
a zooreg series.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.