[R] reproducible sample() in mclapply

David Winsemius dwinsemius at comcast.net
Tue Mar 13 19:13:28 CET 2012


On Mar 13, 2012, at 12:51 PM, Lik Wee Lee wrote:

> Hi,
>
> Using the multicore package and calling sample() in mclapply,
> how do I get the results to be reproducible?
> I know the random number is seeded by process id and so is
> different for each run.

You might want to look up the thread in last month's section of the R- 
devel mailing list Archives entitled "portable parallel seeds project:  
request for critiques""

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list