Possible Duplicate:
Random sampling a list of genes
I would like to create 1000 random lists of 1652 genes from a universe of 19.000 genes. I decided to replace since the universe is not so big. The only condition is that lists can contain similar genes between them (due to replacement) but each list can not contain a gene more than one time. So it will be unique in the single list. Any suggestion about this?
Ex: Universe = letters[1:26]
Desired output:
[[1]] [[2]] [[3]] [[...]] a b f b c a c d b f z j h j o
I would like avoid a situation like:
[[1]] [[...]] a a b c c
Since the universe is not so big I cannot set REPLACE = F. If I set REPLACE = T, replicated elements occur in the list…this is what I’m trying to avoid for my analysis.
Thanks in advance
E.
This code draws 5 samples of 10 from the Universe, without replacement. I think this is what you want: