ocLapply: lapply-like function that parallelizes code when possible.

Description Usage Arguments Details Value Author(s) See Also

View source: R/utils-parallel.R

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

1
ocLapply(X, FUN, ..., neededPkgs)

Arguments

X

first argument to FUN.

FUN

function to be executed.

...

additional arguments to FUN.

neededPkgs

packages needed to execute FUN on the compute nodes.

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.

Value

A list of length length(X).

Author(s)

Benilton S Carvalho

See Also

lapply, parStatus


oligoClasses documentation built on Nov. 1, 2018, 2:26 a.m.