2025-01-12 04:36:52 +08:00

10 lines
236 B
Plaintext

library(parallel)
# use the same random numbers for all values
set.seed(1)
simplify2array(mclapply(rep(4, 5), rnorm))
set.seed(1)
simplify2array(mclapply(rep(4, 5), rnorm, mc.preschedule = FALSE,
mc.set.seed = FALSE))