bit (version 1.1-15.1)

bbatch: Balanced Batch sizes

Description

bbatch calculates batch sizes so that they have rather balanced sizes than very different sizes

Usage

bbatch(N, B)

Arguments

N

total size

B

desired batch size

Value

a list with components

b

the batch size

nb

the number of batches

rb

the size of the rest

Details

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

See Also

repfromto, ffvecapply

Examples

Run this code
# NOT RUN {
  bbatch(100, 24)
# }

Run the code above in your browser using DataLab