bpplapply: Wrapper for bplapply

View source: R/bpplapply.R

bpplapplyR Documentation

Wrapper for bplapply

Description

Wrapper function for bplapply that automatically handles issues with BiocParallel related to different OS platforms.

Usage

bpplapply(
  X,
  FUN,
  apply_fun = parallel::mclapply,
  workers = check_workers(),
  progressbar = workers > 1,
  verbose = workers == 1,
  use_snowparam = TRUE,
  register_now = FALSE,
  ...
)

Arguments

X

Any object for which methods length, [, and [[ are implemented.

FUN

The function to be applied to each element of X.

apply_fun

Iterator function to use.

workers

Number of threads to parallelize across.

progressbar

logical(1) Enable progress bar (based on plyr:::progress_text).

verbose

Print messages.

use_snowparam

Whether to use SnowParam (default: TRUE) or MulticoreParam (FALSE) when parallelising across multiple workers.

register_now

Register the cores now with register (TRUE), or simply return the BPPARAM object (default: FALSE).

...

Arguments passed on to BiocParallel::bplapply

BPPARAM

An optional BiocParallelParam instance determining the parallel back-end to be used during evaluation, or a list of BiocParallelParam instances, to be applied in sequence for nested calls to BiocParallel functions.

BPREDO

A list of output from bplapply with one or more failed elements. When a list is given in BPREDO, bpok is used to identify errors, tasks are rerun and inserted into the original results.

BPOPTIONS

Additional options to control the behavior of the parallel evaluation, see bpoptions.

Value

(Named) list.

Examples

X <- stats::setNames(seq_len(length(letters)), letters)
out <- bpplapply(X, print) 

serachoi1230/EpiCompare documentation built on Jan. 30, 2024, 11:37 a.m.