[R] Randomness

Spencer Graves spencer.graves at pdf.com
Mon May 26 23:08:37 CEST 2003


	  "?.Random.seed" should answer your immediate questions about how the 
random numbers were generated.  Articles appeared in The American 
Statistician a few years ago on the accuracy of statistical computations 
in S-Plus that said that S-Plus was one bit away from the best known 
algorathm at that time.  I suspect that the R developers have fixed that 
minor problem.  This R help page cites several articles and provides 
alternative methods of random number generation, so it is probably among 
the best available.

	  There is a standard naming convention in R / S for functions 
associated with probability distributions.  An initial letter "r" = 
random numbers, "d" = density", "p" = cumulative probability 
distribution function (cdf), "q" = quantile function = inverse cdf. 
Succeeding letters specify the distribution, so "runif" = uniform, 
"rnorm" = normal, "rt" = Student's t, etc.

hth.  spencer graves

dcum007 at ec.auckland.ac.nz wrote:
> Hi,
> I am very new to R and cannot seem to find how it generates random numbers. I 
> am currently involved with a project that requires a random number generator 
> and have developed one. I am, however, unsure of just how random it is and was 
> wanting to compare my generator with that of R (as well as others). 
> If anyone knows how the random numbers are generated or have any ideas on 
> testing or where a true pseudo-random number generator can be found I would 
> love to know.
> David
> dcum007 at ec.auckland.ac.nz
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list