mclapply {parallel}R Documentation

Serial versions of mclapply, mcmapply and pvec

Description

These are simple serial versions of mclapply, mcmapply, mcMap and pvec for Windows where forking is not available.

Usage

mclapply(X, FUN, ..., mc.preschedule = TRUE, mc.set.seed = TRUE,
         mc.silent = FALSE, mc.cores = 1L,
         mc.cleanup = TRUE, mc.allow.recursive = TRUE)

mcmapply(FUN, ..., MoreArgs = NULL, SIMPLIFY = TRUE, USE.NAMES = TRUE,
        mc.preschedule = TRUE, mc.set.seed = TRUE,
        mc.silent = FALSE, mc.cores = 1L, mc.cleanup = TRUE)

mcMap(f, ...)

pvec(v, FUN, ..., mc.set.seed = TRUE, mc.silent = FALSE,
     mc.cores = 1L, mc.cleanup = TRUE)

Arguments

X

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

v

vector to operate on.

FUN

the function to be applied to each element of X or v, or in parallel to ... .

f

the function to be applied in parallel to ....

...

For mclapply and pvec, optional arguments to FUN. For mcmapply and mcMap, vector or list inputs: see mapply.

MoreArgs, SIMPLIFY, USE.NAMES

see mapply.

mc.preschedule, mc.set.seed, mc.silent, mc.cleanup, mc.allow.recursive

Ignored on Windows.

mc.cores

The number of cores to use, i.e. at most how many child processes will be run simultaneously. Must be exactly 1 on Windows (which uses the master process).

Details

mclapply calls lapply and pvec makes a single call FUN(v, ...). On Unix-alikes mc.cores > 1 is allowed and uses parallel operations.

Value

For mclapply, a list of the same length as X and named by X.

For mcmapply, a list, vector or array: see mapply.

For mcMap, a list.

For pvec, a vector of the same length as v.

See Also

parLapply, clusterMap.


[Package parallel version 2.15.1 Index]