\Header{diffinv}{Discrete Integrals: Inverse of Differencing}
\methalias{diffinv.default}{diffinv}
\methalias{diffinv.ts}{diffinv}
\methalias{diffinv.vector}{diffinv}
\keyword{ts}{diffinv}
\begin{Description}\relax
Computes the inverse function of the lagged differences function
\code{\Link{diff}}.\end{Description}
\begin{Usage}
\begin{verbatim}
diffinv(x, lag = 1, differences = 1,
        xi = rep(0.0, lag*differences*NCOL(x)))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a numeric vector, matrix, or time series.
\item[\code{lag}] a scalar lag parameter.
\item[\code{differences}] an integer representing the order of the
difference.
\item[\code{xi}] a numeric vector, matrix, or time series containing the
initial values for the integrals.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{diffinv} is a generic function with methods for class \code{"ts"}
and \code{default} for vectors and matrices.

Missing values are not handled.\end{Details}
\begin{Value}
A numeric vector, matrix, or time series representing the discrete
integral of \code{x}.\end{Value}
\begin{Author}\relax
A. Trapletti\end{Author}
\begin{SeeAlso}\relax
\code{\Link{diff}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
s <- 1:10
d <- diff(s)
diffinv(d, xi = 1)
\end{ExampleCode}
\end{Examples}

