acum {onemap} | R Documentation |
Calculates the cumulative sum from 1
to w
.
acum(w)
w |
a non-negative integer |
Returns the cumulative sum 1+2+...+w
, that is,
w*(w+1)/2,
for w >=q 0.
Internally used by onemap - you probably do not need to use it directly.
Gabriel R A Margarido, gramarga@esalq.usp.br
acum(0) # 0 acum(4) # 1+2+3+4