ezMclapply: Parallel version of 'lapply()'

View source: R/util.R

ezMclapplyR Documentation

Parallel version of lapply()

Description

This function is a modified version of mclapply() of the parallel package and allows a parallel usage of lapply.

Usage

ezMclapply(
  x,
  FUN,
  ...,
  mc.preschedule = TRUE,
  mc.set.seed = TRUE,
  mc.silent = FALSE,
  mc.cores = min(length(x), ezThreads())
)

Arguments

x

a list to apply the function to.

FUN

the function to apply to each list element.

...

additional arguments to be passed to lapply() and mclapply().

mc.preschedule

a logical passed to mclapply().

mc.set.seed

a logical passed to mclapply().

mc.silent

a logical passed to mclapply().

mc.cores

an integer passed to mclapply().

Value

Returns a list of the same length as x with FUN applied to its elements.

Author(s)

Rehrauer, Hubert

Schmid, Peter

See Also

mclapply

Examples

l1 = list(a=1:3, b=c(2,5), c=4:8)
ezMclapply(l1,sum)

uzh/ezRun documentation built on Dec. 26, 2024, 9:53 a.m.