I'm getting slightly different random numbers depending on the OS (Windows vs Linux) although I have specified the seed using set.seed.

Is there anyway to guarantee reproducibility across platforms?

More specifically, I am looking for a way to force the R on Linux produce the same random numbers the R on Windows produces.

You could test the following code on both platforms:

set.seed(1234); print(rnorm(1), 22)

More Farideh Bagherzadeh Khiabani's questions See All
Similar questions and discussions