[R] combination levels

Paul Green pgreen at umich.edu
Thu Oct 2 20:40:25 CEST 2003


Is there a function in R that will give all
combination levels. For example, I see
there is a "choose" function that gives

 >choose(5,2)
10

but I want
	
	1 2
	1 3
	1 4
	1 5
	2 3
	2 4
	2 5
	3 4
	3 5
	4 5

This is a simple example. Actually I would like
to do something like 10 choose 4.

Paul




More information about the R-help mailing list