How to use set.seed()



How do we decide how much seeds to specify while using it in various algorithms



You don’t decide. Seed value can be any Integer you desire. Seed value is choosen so that the random number generated by the computer can be generated again in case we wish to reproduce the proceedings or the results obtained.

Hope this helps.




Let us say that you are doing a simulation for comparing two different algorithms and you want to create random data sets

If you choose the number of sets to be 1000,for each iteration , you can use seeds from 1 to 1000

perform simulation
perform simulation

@NSS has already explained that with seeds you can reproduce the exact same data for comparison’s sake