Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bbatch

Balanced Batch sizes


Description

bbatch calculates batch sizes in 1..N so that they have rather balanced sizes than very different sizes.

Usage

bbatch(N, B)

Arguments

N

total size in 0..integer_max

B

desired batch size in 1..integer_max

Details

Tries to have rb==0 or rb as close to b as possible while guaranteeing that rb < b && (b - rb) <= min(nb, b)

Value

a list with components

b

the batch size

nb

the number of batches

rb

the size of the rest

Author(s)

Jens Oehlschlägel

See Also

Examples

bbatch(100, 24)

bit

Classes and Methods for Fast Memory-Efficient Boolean Selections

v4.0.4
GPL-2 | GPL-3
Authors
Jens Oehlschlägel [aut, cre], Brian Ripley [ctb]
Initial release
2020-08-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.