mercredi 9 janvier 2019

While using setseed if I set seed as set.seed(123) will it select same database as from different system?

Lets say in my system I set seed as set.seed(123). It will select some random rows from my data. Will it select the same data as mine if we use the same code on different machine using same data?

set.seed(123)
sample(1:6, 10, replace=TRUE)

I am getting below results..

sample(1:6, 10, replace=TRUE)
[1] 2 5 3 6 6 1 4 6 4 3

If I run this same code from different system then will i get the same results or different results?




Aucun commentaire:

Enregistrer un commentaire