permutation of vectors (1 or 0)
Dear all, I have 2 vectors of 10 elements, each of them contains either 0 or 1, like following:
Null<-rep(0,10) Null
[1] 0 0 0 0 0 0 0 0 0 0
One<-rep(1,10) One
[1] 1 1 1 1 1 1 1 1 1 1 How can I obtain a matrix rows of which can take all possible combinations? e.g. 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 Many thanks, Olga -- View this message in context: http://r.789695.n4.nabble.com/permutation-of-vectors-1-or-0-tp4653607.html Sent from the R help mailing list archive at Nabble.com.