sapply_by_ncores: Sapply by number of cores

Description Usage Arguments

View source: R/sapply_by_ncores.R

Description

If ncores==1, use sapply, else use parallel::parSapply.

Usage

1
sapply_by_ncores(ncores, X, FUN, cl = NULL)

Arguments

ncores

Integer. If > 1, number of cores to use for parallel computing. You can detect how many are available for your system using detectCores.

X

a vector (atomic or list) or an expression object. Other objects (including classed objects) will be coerced by base::as.list.

FUN

the function to be applied to each element of X: see ‘Details’. In the case of functions like +, %*%, the function name must be backquoted or quoted.

cl

Cluster object, created by parallel or by package NULL, use the registered default cluster.


jdreyf/PANTS documentation built on July 18, 2019, 10:12 a.m.