[R] R random number generator

Mai Zhou mai at ms.uky.edu
Thu Apr 29 00:38:40 CEST 1999


R 0.64 on windows NT 4.0

Sometimes I got an error message by doing this

> .Random.seed <- c(1, 1:2)
> .Random.seed
[1] 1 1 2
> runif(5)
Warning: Wrong length .Random.seed; forgot initial RNGkind? set to Wichmann-Hill[1] 0.02253721 0.84832584  ........

Sometimes I do not get error message:

> .Random.seed <- c(1, 1:2)
> .Random.seed
[1] 1 1 2
> runif(1)
[1] 0.5641106
> 

Not even this got error message sometimes

> .Random.seed <- c(0, 1:2)
> runif(1)
[1] 0.03381877
> 

But sometime it does

> .Random.seed <- c(0, 1:2)
> .Random.seed
[1] 1 1 2
> runif(1)
Warning: Wrong length .Random.seed; forgot initial RNGkind? set to Wichmann-Hill
[1] 0.02253721

Notice the result are also different. I cannot seem to pin point
when it gets or not get the error message.

Mai Z
mai at ms.uky.edu
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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