What does the integer while setting the seed mean?

前端 未结 3 972
清酒与你
清酒与你 2020-12-30 02:11

I want to randomly select n rows from my data set using the sample() function in R. I was getting different outputs each time and hence used

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-30 02:57

    It is just a number used to set seeds for the random number generator. It has nothing to do with your data. If you don't explicitly provide a seed, a new one is created from the current time.

    See the ?set.seed help page for plenty of details about it.

提交回复
热议问题