# diffinv

0th

Percentile

##### Discrete Integration: Inverse of Differencing

Computes the inverse function of the lagged differences function diff.

Keywords
ts
##### Usage
diffinv(x, ...)
"diffinv"(x, lag = 1, differences = 1, xi, ...)
"diffinv"(x, lag = 1, differences = 1, xi, ...)
##### Arguments
x
a numeric vector, matrix, or time series.
lag
a scalar lag parameter.
differences
an integer representing the order of the difference.
xi
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.
##### Details

diffinv is a generic function with methods for class "ts" and default for vectors and matrices.

Missing values are not handled.

##### Value

A numeric vector, matrix, or time series (the latter for the "ts" method) representing the discrete integral of x.

##### See Also

diff

##### Aliases
• diffinv
• diffinv.default
• diffinv.ts
##### Examples
library(stats) s <- 1:10 d <- diff(s) diffinv(d, xi = 1) 
Documentation reproduced from package stats, version 3.2.5, License: Part of R 3.2.5

### Community examples

Looks like there are no examples yet.