Description Usage Arguments Value
Returns a vector whose elements are the cumulative sums of the inputted numeric vector. The argument 'threshold' controls the max/min ceiling/floor of the running sum before it is reset; i.e., if the threshold is set to (+/-) Inf, one would, essentially, compute the base R 'cumsum', albeit much slower
1 | cumsum_reset(x, threshold)
|
x |
A numeric vector |
threshold |
A numeric scalar specifying the cumulative threshold(reset) |
A named numeric vector whose names correspond to the group of summed values before the specified threshold
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.