[R-SIG-Mac] set.seed

Adrian Dușa du@@@@dr|@n @end|ng |rom un|buc@ro
Thu Jan 23 12:15:25 CET 2020


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 using gmail.com> wrote:
>
> 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
>
> > RNGkind(sample.kind="Rejection")
> > set.seed(12)
> > sample(letters[1:10])
>  [1] "b" "g" "c" "f" "e" "i" "d" "j" "h" "a"
> > RNGkind(sample.kind="Rounding")
> Warning message:
> In RNGkind(sample.kind = "Rounding") : non-uniform 'Rounding' sampler used
> > set.seed(12)
> > sample(letters[1:10])
>  [1] "a" "h" "i" "b" "g" "j" "e" "f" "d" "c"
>
>
> > On 23 Jan 2020, at 09:51 , Adrian Dușa via R-SIG-Mac <
r-sig-mac using r-project.org> wrote:
> >
> > 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:
> >> set.seed(12)
> >> sample(letters[1:10])
> > [1] "a" "h" "i" "b" "g" "j" "e" "f" "d" "c"
> >
> >
> > New Mac:
> >> set.seed(12)
> >> sample(letters[1:10])
> > [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
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-SIG-Mac mailing list
> > R-SIG-Mac using r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd.mes using cbs.dk  Priv: PDalgd using gmail.com
>
>
>
>
>
>
>
>
>


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

	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list