Re: [R] truth (karnaugh) table

2009-09-21 Thread Henrique Dallazuanna
Try this: do.call(expand.grid, rep(list(0:1), 4)) On Mon, Sep 21, 2009 at 2:04 PM, baptiste auguie baptiste.aug...@googlemail.com wrote: Dear list, I think I'm being dense, but I can't get combn or expand.grid to give me this result. I need to generate a matrix of all 16 possible sequences

[R] truth (karnaugh) table

2009-09-21 Thread baptiste auguie
Dear list, I think I'm being dense, but I can't get combn or expand.grid to give me this result. I need to generate a matrix of all 16 possible sequences of 4 boolean elements, 0001 0010 0011 0100 . (in the end I'll have to assign NA to the 0s and some value to the 1s but let's

Re: [R] truth (karnaugh) table

2009-09-21 Thread baptiste auguie
I knew I was missing the obvious. And to think it's only Monday... Thanks everyone! baptiste 2009/9/21 Henrique Dallazuanna www...@gmail.com: Try this: do.call(expand.grid, rep(list(0:1), 4)) On Mon, Sep 21, 2009 at 2:04 PM, baptiste auguie baptiste.aug...@googlemail.com wrote: Dear