Partition a vector of indices into chunks, optionally
respecting category boundaries.
Usage
partition_indices(n, chunk_size, category_sizes = NULL, shuffle = TRUE)
Arguments
- n
Total number of indices.
- chunk_size
Maximum size of each chunk.
- category_sizes
Optional vector of category sizes.
- shuffle
Logical. If TRUE, shuffle indices before partitioning.
Value
A list of index vectors.