All possible samples of fixed size
Gives a matrix whose rows are the vectors (0 or 1) of all samples of fixed size.
writesample(n,N)
n |
sample size. |
N |
population size. |
# all samples of size 4 # from a population of size 10. w=writesample(4,10) # the samples are t(apply(w,1,function(x) (1:ncol(w))[x==1]))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.