| cumsum | R Documentation | 
Returns a numeric object whose elements are the cumulative sums of the elements of the argument.
cumsum(x, na.rm = TRUE)
x | 
 a numeric object.  | 
na.rm | 
 logical. Should missing values be removed? Default   | 
If na.rm=TRUE, then NA are treated as 0 when computing the cumulative sum.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.