Arguments
x
A vector containing the names of the quantitative variables to be differenced. If NULL, all quantitative variables will be differenced.
group
The name of a group factor (optional). If NULL, no groups are considered.
time
The name of a time factor (optional). If NULL and group is not NULL, data are assumed temporally ordered within each group.
If both group and time are NULL, data are assumed temporally ordered.
data
An object of class data.frame containing the variables to be differenced,
the group factor if group is not NULL, and the time factor if time is not NULL.
k
The order of differentiation to be applied to all variables, or a vector of orders of differentiation, one for each variable to be differenced.
Default is 0 (no differentiation).