parallelStart
. For parallel/multicore
mclapply
is used, for snowfall
sfClusterApplyLB
.parallelMap(fun, ..., more.args = list(),
simplify = FALSE, use.names = FALSE,
level = as.character(NA))
function
]
Function to map over
...
.list
]
A list of other
arguments passed to fun
. Default is empty list.logical(1)
]
Should the result
be simplified? See sapply
. Default is
FALSE
.logical(1)
]
Should result be
named by first vector if that is of class character or
integer? Default is FALSE
.character(1)
]
The call is only
parallelized if the same level is specified in
parallelStart
or this argument is
NA
. Default is NA
.parallelExport
, they can be retrieved in
slave code via parallelGetExported
. Note that there is a bug in
mclapply
of parallel because
exceptions raised during slave calls are not corretly
converted to try-errror objects (as claimed in the
documentation) but instead a warning is generated.
Because of this, parallelMap
does not generate an
exception in this case either.
parallelStart()
parallelMap(identity, 1:2)
parallelStop()
Run the code above in your browser using DataLab