Re: [R] Combinatorial problem

2009-08-12 Thread David Scott
Bernd Bischl wrote: Dimitris Rizopoulos wrote: you could try something like the following: groups <- list(gp1 = 1:3, gp2 = 4:5, gp3 = 6:7, gp4 = 8:10, gp5 = 11) combn(5, 2, function (x) expand.grid(groups[x]), simplify = FALSE) combn(5, 3, function (x) expand.grid(groups[x]), si

Re: [R] Combinatorial problem

2009-08-12 Thread Bernd Bischl
Dimitris Rizopoulos wrote: you could try something like the following: groups <- list(gp1 = 1:3, gp2 = 4:5, gp3 = 6:7, gp4 = 8:10, gp5 = 11) combn(5, 2, function (x) expand.grid(groups[x]), simplify = FALSE) combn(5, 3, function (x) expand.grid(groups[x]), simplify = FALSE) combn

Re: [R] Combinatorial problem

2009-08-12 Thread Dimitris Rizopoulos
you could try something like the following: groups <- list(gp1 = 1:3, gp2 = 4:5, gp3 = 6:7, gp4 = 8:10, gp5 = 11) combn(5, 2, function (x) expand.grid(groups[x]), simplify = FALSE) combn(5, 3, function (x) expand.grid(groups[x]), simplify = FALSE) combn(5, 4, function (x) expand.g