Re: [R-pkg-devel] Change in normal random numbers between R 3.5.3 and R 3.6.0

2019-05-10 Thread Duncan Murdoch
On 10/05/2019 8:55 a.m., Martin Maechler wrote: Ulrike Grömping on Fri, 10 May 2019 06:39:39 +0200 writes: > Mark, > I used > if (getRversion()>="3.6.0") RNGkind(sample.kind="Rounding") > And that works. Actually, using rnorm afterwards also > yields the same

Re: [R-pkg-devel] Change in normal random numbers between R 3.5.3 and R 3.6.0

2019-05-10 Thread Martin Maechler
> Ulrike Grömping > on Fri, 10 May 2019 06:39:39 +0200 writes: > Mark, > I used > if (getRversion()>="3.6.0") RNGkind(sample.kind="Rounding") > And that works. Actually, using rnorm afterwards also > yields the same random numbers. Yes, "of course",

Re: [R-pkg-devel] Change in normal random numbers between R 3.5.3 and R 3.6.0

2019-05-10 Thread R. Mark Sharp
Ulrike, RNGkind() worked on 3.4.1 and 3.6.0 but generated a warning on R 3.5.3. The message follows: checking whether package ‘nprcmanager’ can be installed ... WARNING Found the following significant warnings: Note: possible error in 'RNGkind(sample.kind = "Rounding")': unused argument

Re: [R-pkg-devel] Change in normal random numbers between R 3.5.3 and R 3.6.0

2019-05-09 Thread Ulrike Grömping
Mark, I used if (getRversion()>="3.6.0") RNGkind(sample.kind="Rounding") And that works. Actually, using rnorm afterwards also yields the same random numbers. My question arose from the fact that I confused myself about the noLD output I was supposed to reproduce. Therefore, my problem

Re: [R-pkg-devel] Change in normal random numbers between R 3.5.3 and R 3.6.0

2019-05-09 Thread R. Mark Sharp
I was dealing with a similar issue but in the context of getting the same unit test code to work on multiple versions of R in a Travis-CI build. It seems RNGkind(sample.kind="Rounding”) does not work prior to version 3.6 so I resorted to using version dependent construction of the argument list

Re: [R-pkg-devel] Change in normal random numbers between R 3.5.3 and R 3.6.0

2019-05-09 Thread Duncan Murdoch
On 09/05/2019 12:43 p.m., Ulrike Grömping wrote: Hmmmh, but does that also apply if the sample.kind has been set to the old version? I.e., would if (getRversion()>="3.6.0") RNGkind(sample.kind="Rounding") val <- 10 set.seed(val) discard <- sample(1000, 100) rnorm(36) produce the same normal

Re: [R-pkg-devel] Change in normal random numbers between R 3.5.3 and R 3.6.0

2019-05-09 Thread Ulrike Grömping
Hmmmh, but does that also apply if the sample.kind has been set to the old version? I.e., would if (getRversion()>="3.6.0") RNGkind(sample.kind="Rounding") val <- 10 set.seed(val) discard <- sample(1000, 100) rnorm(36) produce the same normal random numbers in 3.5.3 and 3.6.0? I would have

Re: [R-pkg-devel] Change in normal random numbers between R 3.5.3 and R 3.6.0

2019-05-09 Thread Duncan Murdoch
On 09/05/2019 9:15 a.m., Ulrike Grömping wrote: Dear R package authors, I am currently struggling with differences in test results between R versions 3.5.3 and 3.6.0: There are expected ones (from the new behavior of sample(), which can be switched off by RNGkind(sample.kind="Rounding")) and

[R-pkg-devel] Change in normal random numbers between R 3.5.3 and R 3.6.0

2019-05-09 Thread Ulrike Grömping
Dear R package authors, I am currently struggling with differences in test results between R versions 3.5.3 and 3.6.0: There are expected ones (from the new behavior of sample(), which can be switched off by RNGkind(sample.kind="Rounding")) and unexpected ones: The normal random numbers from