bptry {BiocParallel} | R Documentation |
Try expression evaluation, recovering from bperror signals
Description
This function is meant to be used as a wrapper around
bplapply()
and friends, returning the evaluated expression
rather than signalling an error.
Usage
bptry(expr, ..., bplist_error, bperror)
Arguments
expr |
An R expression; see |
bplist_error |
A ‘handler’ function of a single argument, used to catch
Setting Setting |
bperror |
A ‘handler’ function of a single argument, use to catch
|
... |
Additional named handlers passed to |
Value
The partially evaluated list of results.
Author(s)
Martin Morgan martin.morgan@roswellpark.org
See Also
Examples
param = registered()[[1]]
param
X = list(1, "2", 3)
bptry(bplapply(X, sqrt)) # bplist_error handler
result <- bptry(bplapply(X, sqrt), bplist_error=identity) # bperror handler
result
bpresult(result)