chunk.Rd
Chunk a vector into a list of vectors of roughly equal length.
The vector or list to be chunked.
The algorithm to use for chunking.
"seq"
_seq_uentially chunks x
.
"mod"
creates chunks where original indices are alike after modulo arithmetic.
"rand"
specifies that x
should be uniformly and randomly distributed across chunks.
The number of integers to chunk (i.e. chunk the sequence 1:n
).
The number of chunks desired.
The maximum desired length of any chunk.
For chunk
, a list with x
chunked across the list entries.
For chunk_int
, a list with the values 1:n
chunked across the list entries.
Exactly one of n_chunks
and max_chunk_size
should be NULL
(to specify both as non-NULL
is an error).