.BG
.FN cumsum
.TL
Cumulative Sums
.CS
cumsum(x)
.AG x
numeric or complex.
.NA
.RT
object like `x' whose i-th value is the sum of the
first i values in `x'.  If the first `NA' in `x' is `x[j]', the j-th
and all following elements of the value will be `NA'.
.EX
cumprod <- function(x)
  exp(cumsum(log(x))) # for positive numbers only
.KW math
.WR
