Hi, I failed to search for R package providing random number generator of "Park and Miller". Anyone know any R package supporting this kind of function? Thanks, Grace -- View this message in context: http://www.nabble.com/Random-Number-Generator-of-Park-and-Miller-tf3636501.html#a10154554 Sent from the R help mailing list archive at Nabble.com.
Hi, I failed to search for R package providing random number generator of "Park and Miller". Anyone know any R package supporting this kind of function? Thanks, Grace -- View this message in context: http://www.nabble.com/Random-Number-Generator-of-Park-and-Miller-tf3636502.html#a10154558 Sent from the R help mailing list archive at Nabble.com.
gracezhang wrote:> > Hi, > > I failed to search for R package providing random number generator of > "Park and Miller". > Anyone know any R package supporting this kind of function? >I failed too. However, here is the source code http://www.firstpr.com.au/dsp/rand31/ which can be either easily rewritten to R or compiled to the shared library, providing functions, callable from R -- View this message in context: http://www.nabble.com/Random-Number-Generator-of-Park-and-Miller-tf3636502.html#a10154560 Sent from the R help mailing list archive at Nabble.com.
By the way, AFAIK, R uses the Mersenne-Twister random number generator, which "has a much better reputation for producing numbers than any linear congruential PRNG" (the same url, http://www.firstpr.com.au/dsp/rand31/) gracezhang wrote:> > I failed to search for R package providing random number generator of > "Park and Miller". > Anyone know any R package supporting this kind of function? >-- View this message in context: http://www.nabble.com/Random-Number-Generator-of-Park-and-Miller-tf3636502.html#a10154562 Sent from the R help mailing list archive at Nabble.com.
Hi, I failed to search for R package providing random number generator of "Park and Miller". Anyone know any R package supporting this kind of function? Thanks, Grace -- View this message in context: http://www.nabble.com/Random-Number-Generator-of-Park-and-Miller-tf3642535.html#a10172789 Sent from the R help mailing list archive at Nabble.com.
On Tue, 24 Apr 2007, gracezhang wrote:> > Hi, > > I failed to search for R package providing random number generator of "Park > and Miller". > Anyone know any R package supporting this kind of function?rng.lcg<-function(x,p1=16807,p2=0,N=2147483647){(x*p1+p2)%%N} Dave -- Dr. David Forrest drf at vims.edu (804)684-7900w drf5n at maplepark.com (804)642-0662h http://maplepark.com/~drf5n/
Reasonably Related Threads
- Speed and memory probs writing large Maildir
- VUC Friday: Bill Miller, former VP of Product Management
- AUTOREPLY Re: ATTN: David Miller Re: Config review (2.0.5)
- Rsync to backup dbox with SIS (Daniel Miller)
- draft-miller-ssh-agent-02: extensions and success messages