Skip to content
Prev 69877 / 398506 Next

Combinations with two part column

Thanks for you quick answer.
Could I extend my question?
How to make the result for each rows with comma ",";
[,1] [,2] [,3] [,4] [,5]
 [1,]    1    2    3    4    5
 [2,]    1    2    3    4    6
 [3,]    1    2    3    4    7
 [4,]    1    2    3    4    8
 [5,]    1    2    3    5    6
 [6,]    1    2    3    5    7
...

I mean like:
    1,    2,    3,    4,    5
    1,    2,    3,    4,    6
    1,    2,    3,    4,    7
    1,    2,    3,    4,    8
    1,    2,    3,    5,    6
    1,    2,    3,    5,    7
[,1] [,2] [,3]
 [1,]    6    7    8
 [2,]    5    7    8
 [3,]    5    6    8
 [4,]    5    6    7
 [5,]    4    7    8
 [6,]    4    6    8
...

this below like:
     6,    7,    8
     5,    7,    8
     5,    6,    8
     5,    6,    7
     4,    7,    8
     4,    6,    8

Best,
Sofyan
On 5/17/05, Gabor Grothendieck <ggrothendieck at gmail.com> wrote: