Calculates difference for each row (column) in a matrix.
A vector indicating subset of rows to
operate over. If NULL, no subsetting is done.
A vector indicating subset of columns to
operate over. If NULL, no subsetting is done.
An integer specifying the lag.
An integer specifying the order of
difference.
An integer vector of
length two specifying the dimension of x, also when not a
matrix. Comment: The reason for this argument
being named with a period at the end is purely technical (we get a run-time
error if we try to name it dim).
Not used.
If TRUE (default), names
attributes of the result are set, otherwise not.
See also diff2().