powered by
bbatch calculates batch sizes so that they have rather balanced sizes than very different sizes
bbatch
bbatch(N, B)
total size
desired batch size
a list with components
the batch size
the number of batches
the size of the rest
Tries to have rb==0 or rb as close to b as possible while guaranteing that rb < b && (b - rb) <= min(nb, b)
rb==0
rb
b
rb < b && (b - rb) <= min(nb, b)
repfromto, ffvecapply
repfromto
ffvecapply
# NOT RUN { bbatch(100, 24) # }
Run the code above in your browser using DataLab