Skip to content
Prev 82442 / 398506 Next

Listing all possible samples of size n form a population

On 08-Dec-05 Ales Ziberna wrote:
Install package "combinat" and use the function 'combn' therein:
[,1] [,2] [,3]
[1,]    1    1    2
[2,]    2    3    3
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]    1    1    1    1    2    2    2    3    3     4
[2,]    2    3    4    5    3    4    5    4    5     5
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]    1    1    1    1    1    1    2    2    2     3
[2,]    2    2    2    3    3    4    3    3    4     4
[3,]    3    4    5    4    5    5    4    5    5     5

and so on ...

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 08-Dec-05                                       Time: 15:07:37
------------------------------ XFMail ------------------------------