>>>>> "CW" == Carl Witthoft <[EMAIL PROTECTED]> >>>>> on Mon, 01 Sep 2008 12:19:07 -0400 writes:
CW> I seem to be missing something here: CW> given a set X:{a,b,c,whatever...} CW> the mathematical definition of 'permutation' is the set of all possible CW> sequences of the elements of X. CW> The definition of 'combination' is all elements of 'permutation' which CW> cannot be re-ordered to become a different element. CW> example: X:{a,b,c} CW> perm(X) = ab, ab, bc, ba, ca, cb CW> comb(X) = ab, ac, bc CW> So maybe a better question for this mailing list is: Are there CW> functions available in any R package which produce perm() and comb() CW> (perhaps as well as other standard combinatoric functions) ? combn() has been "standard R" for quite a while now. As others have mentioned in this thread (different branch of same thread-tree), for permutations, one can typically easily get what one wants via expand.grid() or outer() [or mapply() .. ]. For that reason, those knowing R well haven't seen a big need for a permutation() function. Martin Maechler, ETH Zurich and R Core Team ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.