Skip to contents

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

Usage

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

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

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

Value

a vector (psapply) or list (plapply)

Details

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