ocLapply {oligoClasses} | R Documentation

## 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

`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

[Package oligoClasses version 1.46.0 Index]