Re: [R] Random Number Generator of Park and Miller

2007-04-25 Thread David Forrest
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
  [EMAIL PROTECTED](804)684-7900w
  [EMAIL PROTECTED] (804)642-0662h
http://maplepark.com/~drf5n/

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Random Number Generator of Park and Miller

2007-04-24 Thread gracezhang

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.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Random Number Generator of Park and Miller

2007-04-23 Thread gracezhang

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.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Random Number Generator of Park and Miller

2007-04-23 Thread gracezhang

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.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Random Number Generator of Park and Miller

2007-04-23 Thread Vladimir Eremeev


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.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Random Number Generator of Park and Miller

2007-04-23 Thread Vladimir Eremeev

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.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.