combn {set} | R Documentation |
Generate all combinations of the elements of x taken
m at a time. If x is a positive integer, returns all
combinations of the elements of seq(x) taken m at a
time. If argument FUN is not NULL, applies a function
given by the argument to each point. If simplify is
FALSE, returns a list; otherwise returns an array, typically
a matrix. ... are passed unchanged to the FUN function,
if specified.
combn(x, m);
Factors x are accepted.
A list or array, see the simplify argument above. In the latter case, the identity dim(combn(n, m)) == c(m, choose(n, m)) holds.