Session Ready
Exercise

Reproducibility (II)

We will slightly modify the first exercise of this chapter and ask the same question. We ran the following code in your workspace:

library(doParallel)
library(doRNG)
cl <- makeCluster(2)
registerDoParallel(cl)
registerDoRNG(100)

Is the following code reproducible on a cluster of any size and why?

set.seed(100)
res <- foreach (i = 1:3) %dopar% rnorm(3)
Instructions
50 XP
Possible Answers