powered by
Computes the lagged and iterated differences.
diff2(x, idxs = NULL, lag = 1L, differences = 1L, ...)
A numeric vector of length N.
numeric
vector
A vector indicating subset of elements to operate over. If NULL, no subsetting is done.
NULL
An integer specifying the lag.
integer
An integer specifying the order of difference.
Not used.
Returns a numeric vector of length N - differences.
differences
diff().
diff
# NOT RUN { diff2(1:10) # }
Run the code above in your browser using DataLab