batch_vec | R Documentation |
Split a vector into batches, each no longer than batch_size
and
creating at least n_cores
batches, for use in parallel
calculations.
batch_vec(vec, batch_size = NULL, n_cores = 1)
vec |
A vector to be split into batches |
batch_size |
Maximum size for each batch |
n_cores |
Number of compute cores, to be used as a minimum number of batches. |
A list of vectors, each no longer than batch_size
, and with at least n_cores
componenets.
batch_cols()
vec_split <- batch_vec(1:304, 50, 8)
vec_split2 <- batch_vec(1:304, 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.