R/parallel.r

Defines functions setup_parallel

setup_parallel <- function() {
  if (!requireNamespace("foreach", quietly = TRUE)) {
    # EXCLUDE COVERAGE START
    stop("foreach package required for parallel plyr operation",
      call. = FALSE)
    # EXCLUDE COVERAGE END
  }
  if (foreach::getDoParWorkers() == 1) {
    # EXCLUDE COVERAGE START
    warning("No parallel backend registered", call. = TRUE)
    # EXCLUDE COVERAGE END
  }
}

Try the plyr package in your browser

Any scripts or data that you put into this service are public.

plyr documentation built on Oct. 2, 2023, 9:07 a.m.