ocLapply:
lapply-like function that parallelizes code when possible.
Description
ocLapply is an lapply-like function that checks if ff/snow are loaded
and if the cluster variable is set to execute FUN on a cluster. If these
requirements are not available, then lapply is used.
Usage
ocLapply(X, FUN, ..., neededPkgs)
Arguments
FUN
function to be executed.
...
additional arguments to FUN.
neededPkgs
packages needed to execute FUN on the compute nodes.
Value
A list of length length(X).
Details
neededPkgs
is needed when parallel computing is expected to be
used. These packages are loaded on the compute nodes before the
execution of FUN.
See Also
lapply, parStatus