Skip to content

Latest commit

 

History

History
8 lines (8 loc) · 246 Bytes

parallel.md

File metadata and controls

8 lines (8 loc) · 246 Bytes

how to make mclapply with random sampling reproducible?

library(parallel)
RNGkind("L'Ecuyer-CMRG")
set.seed(1243)
mclapply(1:3, function(i) sample(letters, 1), mc.cores = 3)
mclapply(1:3, function(i) sample(letters, 1), mc.cores = 3)