Learn R Programming

grandR (version 0.2.6)

psapply: Parallel (s/l)apply

Description

Depending on whether SetParallel has been called, execute in parallel or not.

Usage

psapply(..., seed = NULL, enforce = NA)

plapply(..., seed = NULL, enforce = NA)

Value

a vector (psapply) or list (plapply)

Arguments

...

forwarded to lapply or parallel::mclapply

seed

Seed for the random number generator

enforce

if TRUE, do it parallelized no matter what IsParallel() says, if FALSE do it non-parallelized no matter what IsParallel() says

Details

If the code uses random number specify the seed to make it deterministic