[R] seed problem?
Mika Hamari
m|k@@h@m@r|73 @end|ng |rom out|ook@com
Mon Mar 29 11:25:25 CEST 2021
Thank you, Jeff! I had that file, and when I removed it, that solved the problem. Now random numbers are really random. Excellent!
Mika
Lähetetty Samsung Galaxy -älypuhelimesta.
-------- Alkuperäinen viesti --------
Lähettäjä: Jeff Newmiller <jdnewmil using dcn.davis.ca.us>
Päivämäärä: 29.3.2021 10.31 (GMT+02:00)
Saaja: r-help using r-project.org, Mika Hamari <mika.hamari73 using outlook.com>, r-help using r-project.org
Aihe: Re: [R] seed problem?
Check if you have a .RData file in your R startup directory. It may contain the seed.
.RData files (without anything in front of the period) are dangerous... many R users avoid them because they can easily drag in mistakes from previous sessions to plague you.
On March 28, 2021 9:02:17 AM PDT, Mika Hamari <mika.hamari73 using outlook.com> wrote:
>Hi!
>
>I have Windows 10 on PC and different versions of R. I noticed that
>when I executed simulation with R 4.0.3, it gave exactly the same
>results next time when I re-opened the program. I didn�t set the seed.
>
>I tested this also with simple �rnorm(10,100,10)�, and the results were
>every time the same, when I re-opened the program. It seems that it
>starts with the same seed. R 4.0.0 and 4.0.3 did it, both with 32- and
>64-bit versions. But with R Studio the results were every time
>different, as they were also different with 3.4.3. This explains, why I
>hadn�t noticed this earlier.
>
>I know the function set.seed(), but I wonder, how in the first place
>seed can be every time same, if you don�t set it to be. What I read
>about seeds, this should be very highly improbable occurence.
>
>Thanks to all developers for what they are doing for common good. I
>love R!
>
>Mika Hamari
>
> [[alternative HTML version deleted]]
--
Sent from my phone. Please excuse my brevity.
[[alternative HTML version deleted]]
More information about the R-help
mailing list