Proportion of cumulative sum over sum

cumsumprop(x)

Arguments

x

Numeric vector

Value

the proportion cumulative sum over sum

Examples


x <- 1:4
cumsumprop(x) ## 0.1, 0.3, 0.6, 1
#> [1] 0.1 0.3 0.6 1.0