Skip to content
Prev 391092 / 398506 Next

How important is set.seed

Well, course! -- any procedure that incorporates "randomness" will
produce *different* random results from different random choices.
set.seed() assures you get the same random choices and hence the same
random results.
[1] 5
[1] 4
[1] 5
[1] 5
[1] 2

## change seed
[1] 3
[1] 3
[1] 2
[1] 2
[1] 3
[1] 5

## back to original. All subsequent random values as previously
[1] 5
[1] 4
[1] 5
[1] 5
[1] 2
[1] 5


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, Mar 22, 2022 at 9:19 AM Neha gupta <neha.bologna90 at gmail.com> wrote: