Return the number of tasks with errors
Examples
# Errors can be intercepted. Consider a function
# that can generate some error. The run will not plot and
# the computation will run anyway.
options(easypar.parallel = FALSE)
results = run(
FUN = function(x) {
if(runif(1) > .5) stop("Some error")
x
},
PARAMS = lapply(1:5, list),
silent = TRUE
)
#> [easypar] 2022-05-30 14:21:09 - Overriding parallel execution setup [TRUE] with global option : FALSE
#> [easypar] 1/5 computations returned errors and will be removed.
# Getters that can return the number of errors
numErrors(results)
#> [1] 0