The ranges have a maximum length.
chunk(x, ...)# S3 method for lvec
chunk(x, chunk_size = 1e+06, ...)
# S3 method for default
chunk(x, chunk_size = NULL, ...)
# S3 method for data.frame
chunk(x, chunk_size = NULL, ...)
an object for which the index ranges should be calculated. Should
support the length
method. For example, an lvec
or a regular R vector.
ignored; used to pass additional arguments to other methods.
a numeric vector of length 1 giving the maximum length of the chunks.
The default chunk size can be changes by setting the option 'chunk_size', (`options(chunk_size = <new default chunk size>)`).
Implementations of chunk for data frames and regular vectors are provided to make it easier to write code that works on both lvec objects and regular R objects.