Skip to content

set.seed

5 messages · Adrian Dusa, Peter Dalgaard

#
Dear All,

I've recently acquired a new MacBook, and while transferring my files and
settings I noticed something I did not expect:

Old Mac:
[1] "a" "h" "i" "b" "g" "j" "e" "f" "d" "c"


New Mac:
[1] "b" "g" "c" "f" "e" "i" "d" "j" "h" "a"

For numbers I don't see anything different, the examples from ?set.seed
producing the same results. Both R versions are the same (3.6.2) and both
computers run macOS Catalina 10.15.2.

I would be grateful for any advice,
Adrian

--
Adrian Dusa
University of Bucharest
Romanian Social Data Archive
Soseaua Panduri nr. 90-92
050663 Bucharest sector 5
Romania
https://adriandusa.eu
#
That's the effect of RNGkind(sample.kind="Rejection") which is the new default. Unfortunately, the older and buggy "Rounding" has a tendency to linger in saved workspaces.

-pd
[1] "b" "g" "c" "f" "e" "i" "d" "j" "h" "a"
Warning message:
In RNGkind(sample.kind = "Rounding") : non-uniform 'Rounding' sampler used
[1] "a" "h" "i" "b" "g" "j" "e" "f" "d" "c"

  
    
#
Dear Peter,

Thanks, it's good to know there is a good explanation for this and also the
sample.kind is now more stable.
Curiously though, I run the very same R version on both computers and I
would have expected RNGkind() to work the same.

Best,
Adrian
On Thu, Jan 23, 2020 at 11:18 AM peter dalgaard <pdalgd at gmail.com> wrote:
default. Unfortunately, the older and buggy "Rounding" has a tendency to
linger in saved workspaces.
r-sig-mac at r-project.org> wrote:
and
both
--
Adrian Dusa
University of Bucharest
Romanian Social Data Archive
Soseaua Panduri nr. 90-92
050663 Bucharest sector 5
Romania
https://adriandusa.eu
#
The most likely explanation is that on one machine you had (like I did)

$ R

R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
....blablabla...

[Previously saved workspace restored]
[1] "a" "h" "i" "b" "g" "j" "e" "f" "d" "c"
[1] "Mersenne-Twister" "Inversion"        "Rounding"        


...whereas

$ R --vanilla -q
[1] "b" "g" "c" "f" "e" "i" "d" "j" "h" "a"
[1] "Mersenne-Twister" "Inversion"        "Rejection"       



-pd

  
    
#
On Thu, Jan 23, 2020 at 3:24 PM peter dalgaard <pdalgd at gmail.com> wrote:
would have expected RNGkind() to work the same.
Yes, that was it.
And easily solved with:

RNGversion(?3.6.2?)

Best,
Adrian

--
Adrian Dusa
University of Bucharest
Romanian Social Data Archive
Soseaua Panduri nr. 90-92
050663 Bucharest sector 5
Romania
https://adriandusa.eu