numErrors: Return the number of tasks with errors

View source: R/numErrors.R

numErrorsR Documentation

Return the number of tasks with errors

Description

Return the number of tasks with errors

Usage

numErrors(R)

Arguments

R

The list of outputs from run

Value

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
)

# Getters that can return the number of errors

numErrors(results)

caravagn/easypar documentation built on June 4, 2022, 4:25 a.m.