Description Usage Arguments Value Examples
Splits any index vector into a list of index vectors where each vector is of length bucketsize exept for the last one which contains the remainder. The remainder is defined as length(x) discrete ranges. Negative to positive.
1 | rangeToBuckets(x, bucketsize = 10)
|
x |
the indices to split into buckets |
bucketsize |
the size each bucket should have |
a list of indices of length bucketsize
1 2 | rangeToBuckets(1:nrow(mtcars), 9)
rangeToBuckets(-2:3, 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.