This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/cumsum.html
cumsum {base}R Documentation

Cumulative Sums, Products, etc.

Usage

cumsum(x)
cumprod(x)
cummax(x)
cummin(x)

Value

A vector with the same length of x, but whose elements are the cumulative sums, products, minima or maxima of those in x. An NA value in x will the corresponding and following elements of the value to be NA.

Examples

cumsum(1:10)
cumprod(1:10)
cummin(c(3:1,2:0,4:2))
cummax(c(3:1,2:0,4:2))

[Package base version 0.60 ]