Compute the cumulative sum on a multilayered raster (rasterbrick), using indices spaning over specific time periods.
cumsum_rb(x, indices = NULL)
rasterbrick object on which cumulative sum should be computed
vector with indices over which the sum is to be cumulated.
This function computes the cumulative sum over specific periods defined by the a vector of incides (e.g. two five-day cumulative sum c(1,1,1,1,1,2,2,2,2,2), restarting at zero on the first day of each series defined by the indices).