\HeaderA{cumsum}{Cumulative Sums, Products, and Extremes}{cumsum}
\aliasA{cummax}{cumsum}{cummax}
\aliasA{cummin}{cumsum}{cummin}
\aliasA{cumprod}{cumsum}{cumprod}
\keyword{arith}{cumsum}
\begin{Description}\relax
Returns a vector whose elements are the cumulative sums, products,
minima or maxima of the elements of the argument.
\end{Description}
\begin{Usage}
\begin{verbatim}
cumsum(x)
cumprod(x)
cummax(x)
cummin(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a numeric object.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
An \code{NA} value in \code{x} causes the corresponding and following
elements of the return value to be \code{NA}.

These are generic functions: methods can be defined for them
individually or via the \code{\LinkA{Math}{Math}} group generic.
\end{Details}
\begin{References}\relax
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
\emph{The New S Language}.
Wadsworth \& Brooks/Cole. (\code{cumsum} only.)
\end{References}
\begin{Examples}
\begin{ExampleCode}
cumsum(1:10)
cumprod(1:10)
cummin(c(3:1, 2:0, 4:2))
cummax(c(3:1, 2:0, 4:2))
\end{ExampleCode}
\end{Examples}

