Skip to content
Prev 4040 / 398506 Next

Combinations

a s
I need some help here.
posible combinations (order doesn't matter) of the elements.
I would like a function such as:
function(x,c(A,B,C,D))
to give a matrix (for x=3) like:
A B C
A B D
A C D
B C D

or for x=2
A B
A C
A D
B C
B D
C D

And so on.
Any ideas??

Thank you,
Alex Ahgarin
Data Management
I.R.W. Co.

-----------------------------------------------
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._