[R] which() over a matrix

2006-11-23 Thread javier garcia-pintado
Hello, A brief question that I am not able to resolve by my own, but I presume it's easy for you: I've used apply to find the values closer to 0 in each row of a matrix: closer.to.0 - apply(abs(myarray),MARGIN=1,min) My question is how could I use which (or another way) to obtain a vector that

Re: [R] which() over a matrix

2006-11-23 Thread Peter Dalgaard
javier garcia-pintado [EMAIL PROTECTED] writes: Hello, A brief question that I am not able to resolve by my own, but I presume it's easy for you: I've used apply to find the values closer to 0 in each row of a matrix: closer.to.0 - apply(abs(myarray),MARGIN=1,min) My question is how

Re: [R] which() over a matrix

2006-11-23 Thread Chuck Cleland
javier garcia-pintado wrote: Hello, A brief question that I am not able to resolve by my own, but I presume it's easy for you: I've used apply to find the values closer to 0 in each row of a matrix: closer.to.0 - apply(abs(myarray),MARGIN=1,min) My question is how could I use which (or