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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.