vendredi 15 juillet 2016

Ensuring that random number generated is different for each loop

My code are as follow:

for (... in ..)
{ for (... in ..)
{runif(1)}}

It's a two nested for loop, and I would like to ensure that every time the loop is run the random number generated is different. I understand that I can use set.seed() but I am not very clear on how to use it.

Any help is appreciated. Thanks in advance!




Aucun commentaire:

Enregistrer un commentaire