View source: R/other_functions.R
diffPad | R Documentation |
This function takes the first difference of a given time series data or vector and pads it with the selected lag length while maintaining the attributes of the input data. ts object or vector can be used.
diffPad(x)
x |
ts object or numeric vector. |
A first difference taken ts object or numeric vector with padding.
values <- c(1:10)
x <- values
x.ts <- ts(data.frame(V1 = values))
diffPad(x)
diffPad(x.ts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.