Re: [R] function sample: diferences across R versions

2019-07-31 Thread Jose Claudio Faria
It works! Thanks, ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\ Jose Claudio Faria UESC/DCET/Brasil joseclaudio.faria at gmail.com Telefones: 55(73)3680.5545 - UESC 55(73)99966.9100 - VIVO ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\ If you have software to deal with statistics, you have ar

Re: [R] function sample: diferences across R versions

2019-07-30 Thread Jeff Newmiller
There seem to be a couple of ways to do this. Rngkind( sample.kind="Rounding" ) or RNGversion("3.5.2") per ?Random https://stat.ethz.ch/pipermail/r-help/2019-June/463109.html On July 30, 2019 5:31:13 PM PDT, Jose Claudio Faria wrote: >Thanks Patrick. > >I took a look at the documentation o

Re: [R] function sample: diferences across R versions

2019-07-30 Thread Jose Claudio Faria
Thanks Patrick. I took a look at the documentation of the RNGkind and RNGversion functions but didn't understand how they work. Can you exemplify how I can, through them, to recapture the old behavior? Best, ///\\\///\\\///\\\///\\\///\\\///\\\///\\\///\\\ Jose Claudio Faria UESC/DCET/Brasil jose

Re: [R] function sample: diferences across R versions

2019-07-30 Thread Patrick (Malone Quantitative)
Poorly phrased--makes it act differently with respect to set.seed() . On Tue, Jul 30, 2019 at 6:55 PM Patrick (Malone Quantitative) wrote: > > My understanding is that sample() in 3.6.0 did, in fact, change in > ways that detach it from set.seed(). > > You can use RNGkind() or RNGversion() to rec

Re: [R] function sample: diferences across R versions

2019-07-30 Thread Patrick (Malone Quantitative)
My understanding is that sample() in 3.6.0 did, in fact, change in ways that detach it from set.seed(). You can use RNGkind() or RNGversion() to recapture the old behavior. See https://cran.rstudio.com/bin/windows/base/NEWS.R-3.6.1.html in the section CHANGES IN R 3.6.0 . Also, please do not pos

[R] function sample: diferences across R versions

2019-07-30 Thread Jose Claudio Faria
Hi, I just noticed the difference in a teaching data generation script between version 3.6.1 and earlier. #! R version 3.4.3 set.seed(2019); sample(1:10, 1) [1] 8 #! R version 3.5.1patched set.seed(2019); sample(1:10, 1) [1] 8 #! R version 3.5.3patched set.seed(2019); sample(1:10, 1) [1] 8 #! R