powered by
Computes the inverse function of the lagged differences function diff.
diff
diffinv(x, ...)# S3 method for default diffinv(x, lag = 1, differences = 1, xi, …) # S3 method for ts diffinv(x, lag = 1, differences = 1, xi, …)
# S3 method for default diffinv(x, lag = 1, differences = 1, xi, …) # S3 method for ts diffinv(x, lag = 1, differences = 1, xi, …)
a numeric vector, matrix, or time series.
a scalar lag parameter.
an integer representing the order of the difference.
a numeric vector, matrix, or time series containing the initial values for the integrals. If missing, zeros are used.
arguments passed to or from other methods.
A numeric vector, matrix, or time series (the latter for the "ts" method) representing the discrete integral of x.
"ts"
x
diffinv is a generic function with methods for class "ts" and default for vectors and matrices.
diffinv
default
Missing values are not handled.
# NOT RUN { s <- 1:10 d <- diff(s) diffinv(d, xi = 1) # }
Run the code above in your browser using DataLab