R: Groups the input integer vector into several groups if the...

grouprunningcumsum {ffbase} | R Documentation

## Groups the input integer vector into several groups if the running cumulative sum increases a certain maximum number

### Description

Groups the input integer vector into several groups if the running cumulative sum increases a certain maximum number

### Usage

    grouprunningcumsum(x, max)

### Arguments

`x` | an integer vector
`max` | the maximum running cumulative size before an extra grouping is done

### Value

An integer vector of the same length of x, indicating groups

[Package ffbase version 0.13.1 Index]