Takes in an expression and returns an expression with the kth order differences along the given axis. The output shape is the same as the input except the size along the specified axis is reduced by k.
Arguments
- x
An Expression or numeric value.
- k
Integer. The number of times values are differenced. Default is 1. (Mapped from R's
lagargument in diff.default; usedifferencesfor repeated differencing which maps tokhere.)- axis
Integer. The axis along which the difference is taken. 2 = along rows/down columns (default), 1 = along columns/across rows.
