unbatched
to get_before_fn
.parallel
, to execute batches in parallel.sleep
, to sleep between batch calls.options(batchman.verbose = TRUE)
to dynamically turn on verbosity.combine
with integers.robust_batch
into batch
, using a retry
parameter. This change is NOT backwards compatible.verbose
is now TRUE by default in interactive mode (where interactive()
evaluates to TRUE), and FALSE by default in non-interactive mode.verbose
to batchman.verbose
so as to not collide with verbose
arguments within actual functions.robust_batch
, has been added that can attempt batching with automatic error-handling. Call robust_batch(batched_fn, ...)
where batched_fn
is the function that you want to use after applying batch
to it, and ...
are the arguments you wanted to pass to batched_fn
. The default amount of max retries is 3, but you can change this by passing batchman.retries
.stop = FALSE
now works as originally intended to keep going with batch processing even if an error occurs midstream. Batches that result in an error simply return NA instead.options('batchman.verbose' = FALSE)
will now dynamically turn off batchman's printed output, even for batched functions after they are generated. Note that there is still no way to dynamically turn on the verbosity if verbose = FALSE
was originally set when the function was made.options('batchman.verbose' = FALSE)
to turn off batchman's print messages. This is potentially useful for tests where digging into batchman to set verbose = FALSE
is annoying. Keep in mind that this still won't affect batched functions after they are generated.The way of getting the pre-batched function has changed from looking at the attr
of the batched function to using get_before_fn(batched_fn)
, which instead relies on looking at the environment of batched_fn
instead of the attributes.
Batched functions now are of class batch_function
(in addition to being of class function
), and printing a batched function will show a list with both the before_fn
(the function prior to batching) and the after_fn
(the batched funtion). This should make looking into the function more clear, while not sacrificing your ability to see what is going on under the hood.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.