Thanks much Ted. I actually had just tried what you suggest here before you posted, and resolved the problem. Thanks also for the other tips. I wrote x = as.vector(c(1:12)) because I thought that the mode of x might be the problem, the error message pointing to .Random.seed notwithstanding.
On a related note, I did a brief test a couple weeks back where I ran a million random samples of 3 from the vector 1:12 and compared the mean against the known mean. It was off by 1 percent, which indicated that the RNG was biased more than I'd have thought. Comments? Jim > Follow-up to my previous reply (just posted). Having read the other > responses and your reactions, try the following: > > rm(.Random.seed) > set.seed(54321) ## (Or your favourite magic number) [*] > x = as.vector(c(1:12)) ## To reproduce your original code ... ! > sample(x,3) > > [*] When you did rm(.Random.seed) as suggested by Uwe, the variable > .Random.seed was lost, so you have to create it again. > > If, after the above, you still get the problem, then something is > very seriously wrong. > > Ted. > > -------------------------------------------------------------------- > E-Mail: (Ted Harding) <ted.hard...@manchester.ac.uk> > Fax-to-email: +44 (0)870 094 0861 > Date: 23-Jul-09 Time: 17:23:09 > ------------------------------ XFMail ------------------------------ > Jim Bouldin, PhD Research Ecologist Department of Plant Sciences, UC Davis Davis CA, 95616 530-554-1740 ______________________________________________ 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.