Re: [R] Sampling with replacement

2010-06-16 Thread Somnath Somnath
ons, try >> expand.grid(1:20,1:20,1:20,1:20) (ugly code). Don't use this for sampling. >> >> hth Rafael >> >> 2010/6/16 Jorge Ivan Velez <> >> >> Try >>> >>> sample(20, 4, replace = TRUE) >>> >>> HTH, >>> Jorge

[R] Sampling with replacement

2010-06-16 Thread Somnath Somnath
Dear all, good morning, I have a population, let say members are tagged with some simple number like 1,2,3,...20. I want to draw a sample with replacement of size 4 (say, can be more than 20 also). Is there any R function which will show me all such possible samples? Thanks [[alternative