[R] random number generation issues with r and compiled C code

hzi@uol.com.br hzi at uol.com.br
Tue Jan 29 03:29:23 CET 2002


On Thu, Jan 24, 2002 at 05:39:14PM -0500, Faheem Mitha wrote:
> 
> Dear People,
> 
> I have been writing a simulation routine that is currently entirely
> written in c++. I've been using the R standalone math library to give me
> random number generation for this. However, I have had to set the seed
> myself, and I am using
> 
> set_seed(time(NULL), clock)
> 
> for every call to unif_rand().
> 
> However, this works really badly. The random numbers aren't uniform at
> all. Does anyone have better suggestions?

Hi-

	One question about "random number generation": AFAIK, true random number generation has to receive random input from the "outside." For instance, when you generate GnuPG or PGP keys for encryption, you have to type something on the keyboard.
	With all the other stuff I've seen that purports to generate random numbers, real randomo is no being generated, right?
	Shoudn't R have some function similar to the above mentioned one that exists in PGP or GNuPG?

	TIA
	Regs,
	Henry



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list