Let see the example
There is a vector of 100 dates of observations
x <- 1:100
I would like to split it on chunks related to the percent of original data ("sum" should be "1").
p <- c(30, 25, 20, 15, 10)
sum(p)
The "p" is a percent of original data (30% and etc.)
The desired output is chunks of observations with variable size:
result <- list(list(1:30), list(31:55), list(56:75), list(76:90), list(91:100))
This is useful for parallel processing when the first chunks have bigger size than the next ones.