R users, Is it possible to do 'exact' permutation tests in R? If I run a perm.test or permutation.test.discrete on a data set that has, for example, 720 possible permutations, will that test permute ALL of those possible permutations, or will it just permute 720 random permutations (thus allowing some possibilities to repeat and some not to be permuted at all)? I'm a little confused by how to code for a permutation test where I will have several subsets within the data that need to be maintained, for example: Labels: A B C D E F Codes: 0 0 2 1 1 1 In the above data, if I want to permute all possible combinations of the 'Codes', while maintaining the quantities of zeros, ones and twos in each permutation, I would compute - 5!/(2!)(1!)(3!) = 10. Is there a way to code a permutation test so that it will compute all possible combinations like in the above example, and then dump each permutation into a separate column vector? Thanks in advance for any help with this. Much appreciated. Steve -- View this message in context: http://www.nabble.com/Exact-Permutation-test-tp16451864p16451864.html Sent from the R help mailing list archive at Nabble.com.