Description Usage Arguments Value Examples
batch maps a function to a batched version of that function.
1 2 3 4 |
batch_fn |
function. The method to batch over. |
keys |
vector. The names of the keys within the function to batch. Can be "..." if one is batching a splat function with no keys. |
splitting_strategy |
function. The strategy used to split up inputs. Leave NULL to use the versatile default splitting strategy. |
combination_strategy |
function. The strategy used to recombine batches. Defaults to class-agnostic combination. |
size |
numeric. The size of the packets. Default 50. |
trycatch |
logical. Whether to wrap the function in a tryCatch block. Can be used to store and retrieve partial progress on an error. |
batchman.verbose |
logical. Whether or not to announce progress by printing dots. |
stop |
logical. Whether trycatch should stop if an error is raised. |
retry |
integer. The number of times to retry on error. 0 for no retrying. |
sleep |
integer. Time in seconds to sleep between batches. |
ncores |
integer. Number of cores to use if parallel is set to true. Notice that it doesn't work on windows. |
parallel |
logical. Use parallel::mclapply to execute your batches. Incompatible with retry. |
a batched version of the passed function.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.