Re: [R] using IF command

2008-08-10 Thread Dan Davison
On Mon, Aug 11, 2008 at 08:23:19AM +1200, Gareth Campbell wrote: > Hey team, > > If I have a matrix: > > 1, 2, > 3, 4, > 4, 0, > 1, 3, > 0, 3 > > 2 columns. > > I want to write an if command that looks at (in this case) row 3 and looks > to see if either [3,1] or [3,2] has a zero in it. IF it

[R] using IF command

2008-08-10 Thread Gareth Campbell
Hey team, If I have a matrix: 1, 2, 3, 4, 4, 0, 1, 3, 0, 3 2 columns. I want to write an if command that looks at (in this case) row 3 and looks to see if either [3,1] or [3,2] has a zero in it. IF it does have a zero I want the zero to be placed in another matrix in the same position. I know