[ top | up ]

Cumulative Sums

Syntax

cumsum(x)

Description

cumsum returns a vector the same length of x, but whose elements are the cumulative sums of those in x. An NA value in x will cause sums involving that element to have value NA.