mclapply2: ##' Wrapper around mclapply to track progress Based on...

View source: R/functions.R

mclapply2R Documentation

##' Wrapper around mclapply to track progress Based on http://stackoverflow.com/questions/10984556

Description

.. content for (no empty lines) ..

Usage

mclapply2(X, FUN, ..., mc.preschedule = TRUE, mc.set.seed = TRUE,
  mc.silent = FALSE, mc.cores = getOption("mc.cores", 2L),
  mc.cleanup = TRUE, mc.allow.recursive = TRUE,
  mc.progress = is.na(Sys.getenv()["RSTUDIO"]), mc.style = 3)

Arguments

X

a vector (atomic or list) or an expressions vector. Other objects (including classed objects) will be coerced by ‘as.list’

FUN

the function to be applied to

...

optional arguments to ‘FUN’

mc.preschedule

see mclapply

mc.set.seed

see mclapply

mc.silent

see mclapply

mc.cores

see mclapply

mc.cleanup

see mclapply

mc.allow.recursive

see mclapply

mc.progress

show a progress bar (by default: TRUE unless we think that we are in an Rstudio session)

mc.style

style of progress bar (see txtProgressBar)

Details

.. content for ..

Value

A list of the same length as X and named by X.

Author(s)

wannymahoots

Florian Klinglmueller

Examples

x <- mclapply2(1:1000, function(i, y) Sys.sleep(0.01))
x <- mclapply2(1:3, function(i, y) Sys.sleep(1), mc.cores=1)

floatofmath/bt88.03.704 documentation built on March 25, 2022, 12:28 p.m.