powered by
Proportion of cumulative sum over sum
cumsumprop(x)
the proportion cumulative sum over sum
Numeric vector
x <- 1:4 cumsumprop(x) ## 0.1, 0.3, 0.6, 1
Run the code above in your browser using DataLab