\Header{cumsum}{Cumulative Sums, Products, and Extremes}
\alias{cummax}{cumsum}
\alias{cummin}{cumsum}
\alias{cumprod}{cumsum}
\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}.\end{Details}
\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}

