[R] all possible combinations of list elements

2006-01-03 Thread Eberhard F Morgenroth
I have a list as follows P - list(A = c(CS, CX), B = 1:4, Y = c(4, 9)) I now would like to prepare a new list where the rows of the new list provide all possible combinations of the elements in the orginal list. Thus, the result should be the following CS 1 4

Re: [R] all possible combinations of list elements

2006-01-03 Thread Marc Schwartz
On Tue, 2006-01-03 at 18:57 -0600, Eberhard F Morgenroth wrote: I have a list as follows P - list(A = c(CS, CX), B = 1:4, Y = c(4, 9)) I now would like to prepare a new list where the rows of the new list provide all possible combinations of the elements in the