Thank you for the help so far. Also, I don't quite understand what the set.seed function does. Does it choose a starting point for the random number generation? Thanks, Penny.
set.seed( ) function
2 messages · Penny Bilton, Petr Savicky
On Sun, Apr 24, 2011 at 10:10:45PM +1200, Penny Bilton wrote:
Thank you for the help so far. Also, I don't quite understand what the set.seed function does. Does it choose a starting point for the random number generation?
Yes. The generator produces a periodic sequence, which may be understood as a long cycle. The seed specifies a starting point in this cycle. For the default generator in R, the period is 2^19937-1, which is a Mersenne prime. The period is long enough so that it cannot be exhausted. The function set.seed() allows to choose between approximately 2^32 different starting points. Petr Savicky.