Returns the ith difference of a time series of rth lag.
diff_cpp(x, lag, differences)
x
A vec that is the time series
vec
lag
A unsigned int that indicates the lag
unsigned int
differences
A dif that indicates how many differences should be taken
dif
A vector containing the differenced time series.
vector
JJB