Skip to content
Prev 25021 / 63424 Next

set_seed

In this case,  how do I choose numbers to make sure  set_seed(n1,n2)  and set.seed(n) produce the same result ?
I am asking because my C code worked correctly if I compile it to produce .exe file and ran it ,  but it gave strange results if it is compiled to .dll file and dynamically loaded into R and call with .C( ). 
   To debug,  I need to let them produce the same random number under two different situation so I can tell what is wrong in R. 

   Thanks a lot.

----- Original Message -----
From: Prof Brian Ripley <ripley at stats.ox.ac.uk>
Date: Monday, May 14, 2007 9:40 pm
Subject: Re: [Rd] set_seed
To: Tong Wang <wangtong at usc.edu>
Cc: R-devel <r-devel at r-project.org>