powered by
Creates a differenced version of a variable for use inside dcce() formulas.
dcce()
D(x, k = 1L)
A numeric vector of the same length as x with leading NAs.
x
NA
A numeric vector.
Integer difference order. Default 1.
x <- c(10, 20, 30, 40, 50) D(x, 1) # NA 10 10 10 10 D(x, 2) # NA NA 20 20 20
Run the code above in your browser using DataLab