[R] (Parallel) Random number seed question...

Dirk Eddelbuettel edd at debian.org
Mon Nov 16 21:43:44 CET 2009


On 16 November 2009 at 11:42, Blair Christian wrote:
| I have k identical parallel pieces of code running, each using n.rand
| random numbers.  I would like to use the same RNG (for now), and set
| the seeds so that I can guarantee that there are no overlaps in the
| random numbers sampled by the k pieces of code.  Another side goal is
| to have reproducibility of my results.  In the past I have used C with
| SPRNG for this task, but I'm hoping that there is an easy way to do
| this in R with poor man's parallelization (eg running multiple Rs on
| multiple processors without the overhead of setting up any mpi or
| using snow(fall)).  It is not clear from the documentation if set.seed

Are you aware of the CRAN packages 'rsprng' by Li and 'rlecuyer' by Sevcikova
and Rossini ?

Dirk

-- 
Three out of two people have difficulties with fractions.




More information about the R-help mailing list