[R] Listing all possible samples of size n form a population of size N

From: Ales Ziberna <aleszib_at_gmail.com>
Date: Fri 09 Dec 2005 - 01:44:43 EST

Dear useRs!

I would like to list all possible samples of size n form a population of size N. Obviously, N must be small (up to 20??) for this to be possible.

For example, let say that N = 3 and n = 2. Therefore, we can say we have units 1, 2 and 3. I believe all possible samples are : {1,2},{2,3} and {1,3}.

I would like to emphasize that I am not looking for the number of different samples, but a list of all possible samples.

Thank you in advance for any suggestions.

Best,

Ales Ziberna



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Dec 09 01:53:18 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:34 EST