Skip to content
Prev 280623 / 398503 Next

unique combinations

On Dec 21, 2011, at 08:59 , Antje Niederlein wrote:

            
I almost said combn(), but that won't give you the same element twice. So either
[,1] [,2]
[1,]    1    1
[2,]    2    2
[3,]    3    3
[4,]    1    2
[5,]    1    3
[6,]    2    3

or
Var1 Var2
1    1    1
4    1    2
5    2    2
7    1    3
8    2    3
9    3    3

or maybe
Var1 Var2
1    1    1
4    1    2
5    2    2
7    1    3
8    2    3
9    3    3