Re: [R] Problem with random numbers/seed

2019-06-21 Thread Rolf Turner
On 22/06/19 5:21 AM, Steven Yen wrote: Unhappy but thanks. Steven Well, if you're *really* unhappy (???) you could always do suppressWarnings(RNGversion("3.5.3")) Does that make you happier? cheers, Rolf On 6/22/2019 1:13 AM, Uwe Ligges wrote: On 21.06.2019 19:09, Steven Yen

Re: [R] Problem with random numbers/seed

2019-06-21 Thread Steven Yen
Unhappy but thanks. Steven On 6/22/2019 1:13 AM, Uwe Ligges wrote: > > > On 21.06.2019 19:09, Steven Yen wrote: >> Now I see that results were replicated but running RNGversion >> I get a warning message. Isn't there a way to do this clean? > > Well, the old RNG is known to be not optimal, hence

Re: [R] Problem with random numbers/seed

2019-06-21 Thread Uwe Ligges
On 21.06.2019 19:09, Steven Yen wrote: Now I see that results were replicated but running RNGversion I get a warning message. Isn't there a way to do this clean? Well, the old RNG is known to be not optimal, hence we give a warning if you choose the old one. This is the clean way if you

Re: [R] Problem with random numbers/seed

2019-06-21 Thread Steven Yen
Now I see that results were replicated but running RNGversion I get a warning message. Isn't there a way to do this clean? > RNGversion("3.5.3") Warning message: In RNGkind("Mersenne-Twister", "Inversion", "Rounding") : non-uniform 'Rounding' sampler used On 6/22/2019 1:03 AM, Uwe Ligges

Re: [R] Problem with random numbers/seed

2019-06-21 Thread Uwe Ligges
What does not work? For me it works under R-3.6.0: x<-1:500 set.seed(12345671) j<-sample(1:length(x),size=60); y<-x[j] summary(j) RNGversion("3.5.3") set.seed(12345671) j<-sample(1:length(x),size=60); y<-x[j] summary(j) Now I get the results you got udner the old R. Best, Uwe

Re: [R] Problem with random numbers/seed

2019-06-21 Thread Steven Yen
Thanks. Somewhat of a mystery. The older version I had was R-3.5.3patched. I cannot get the RNGversion command to run. Can you help? Thanks. On 6/22/2019 12:25 AM, Uwe Ligges wrote: > See the NEWS, the RNG has been changed, use RNGversion > > On 21.06.2019 18:10, Steven Yen wrote: >> Dear all, >>

Re: [R] Problem with random numbers/seed

2019-06-21 Thread Uwe Ligges
See the NEWS, the RNG has been changed, use RNGversion On 21.06.2019 18:10, Steven Yen wrote: Dear all, I did all this work with older R (R-3.5.3.patched and older) but now with R3.6 I cannot replicate the results. Below I sample 60 observations from 1:500 using the sample command with a random