The R Project SVN R

Rev

Rev 61433 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
42333 ripley 1
% File src/library/stats/man/diffinv.Rd
68948 ripley 2
% Part of the R package, https://www.R-project.org
59039 ripley 3
% Copyright 1995-2007 R Core Team
42333 ripley 4
% Distributed under GPL 2 or later
5
 
27497 ripley 6
\name{diffinv}
56186 murdoch 7
\alias{diffinv}
27497 ripley 8
\alias{diffinv.default}
9
\alias{diffinv.ts}
10
\title{Discrete Integration: Inverse of Differencing}
11
\description{
12
  Computes the inverse function of the lagged differences function
61433 ripley 13
  \code{\link{diff}}.
27497 ripley 14
}
35065 ripley 15
\usage{
27497 ripley 16
diffinv(x, ...)
35065 ripley 17
 
18
\method{diffinv}{default}(x, lag = 1, differences = 1, xi, \dots)
19
\method{diffinv}{ts}(x, lag = 1, differences = 1, xi, \dots)
27497 ripley 20
}
21
\arguments{
22
  \item{x}{a numeric vector, matrix, or time series.}
23
  \item{lag}{a scalar lag parameter.}
24
  \item{differences}{an integer representing the order of the
25
    difference.}
26
  \item{xi}{a numeric vector, matrix, or time series containing the
35065 ripley 27
    initial values for the integrals.  If missing, zeros are used.}
27497 ripley 28
  \item{\dots}{arguments passed to or from other methods.}
29
}
30
\details{
31
  \code{diffinv} is a generic function with methods for class \code{"ts"}
32
  and \code{default} for vectors and matrices.
33
 
34
  Missing values are not handled.
35
}
36
\value{
35065 ripley 37
  A numeric vector, matrix, or time series (the latter for the
61433 ripley 38
  \code{"ts"} method) representing the discrete integral of \code{x}.
27497 ripley 39
}
40
\author{A. Trapletti}
41
\seealso{
42
  \code{\link{diff}}
43
}
44
\examples{
45
s <- 1:10
46
d <- diff(s)
47
diffinv(d, xi = 1)
48
}
49
\keyword{ts}