These would more properly be called permutations of a multiset. You can find code on the net by searching for "generate permutations multiset" (though not in R AFAICS.)
David L. Reiner -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, February 13, 2005 8:45 AM To: r-help@stat.math.ethz.ch Subject: [R] combinations without repetition The solution is probably simple but I need someone to point me to it. How can I reduce the following 6 permutations to the 3 unique combinations (1,1,0) (1,0,1) (0,1,1)? permn(c(1,1,0)) [[1]] [1] 1 1 0 [[2]] [1] 1 0 1 [[3]] [1] 0 1 1 [[4]] [1] 0 1 1 [[5]] [1] 1 0 1 [[6]] [1] 1 1 0 Thanks a lot Marcelo Jenny ______________________________________________ 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 ______________________________________________ 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