[R] Matrix elements

2006-03-26 Thread Akkineni,Vasundhara
Hello all, I have a matrix object, xx given as below: [,1] [,2] [1,] 0.02237883 0.601572660 [2,] -0.39880918 0.126498958 [3,] 0.20269214 0.567953402 [4,] -0.45750812 -0.031193600 [5,] -0.30666134 -0.084819484 [6,] -0.37718928 0.078675868 [7,] -0.25432685

Re: [R] Matrix elements

2006-03-26 Thread Liaw, Andy
Something like this should work: which(rowSums(xx 0) == ncol(xx)) Andy From: Akkineni,Vasundhara Hello all, I have a matrix object, xx given as below: [,1] [,2] [1,] 0.02237883 0.601572660 [2,] -0.39880918 0.126498958 [3,] 0.20269214 0.567953402 [4,]

Re: [R] Matrix elements

2006-03-26 Thread Christos Hatzis
PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Akkineni,Vasundhara Sent: Sunday, March 26, 2006 11:49 PM To: r-help@stat.math.ethz.ch Subject: [R] Matrix elements Hello all, I have a matrix object, xx given as below: [,1] [,2] [1,] 0.02237883 0.601572660 [2,] -0.39880918

Re: [R] Matrix elements

2006-03-26 Thread Christos Hatzis
: Sunday, March 26, 2006 11:49 PM To: r-help@stat.math.ethz.ch Subject: [R] Matrix elements Hello all, I have a matrix object, xx given as below: [,1] [,2] [1,] 0.02237883 0.601572660 [2,] -0.39880918 0.126498958 [3,] 0.20269214 0.567953402 [4,] -0.45750812 -0.031193600

Re: [R] Matrix elements

2006-03-26 Thread Gabor Grothendieck
Try this: which(xx[,1] 0 xx[,2] 0) On 3/26/06, Akkineni,Vasundhara [EMAIL PROTECTED] wrote: Hello all, I have a matrix object, xx given as below: [,1] [,2] [1,] 0.02237883 0.601572660 [2,] -0.39880918 0.126498958 [3,] 0.20269214 0.567953402 [4,]

Re: [R] Matrix elements

2006-03-26 Thread Uwe Ligges
Gabor Grothendieck wrote: Try this: which(xx[,1] 0 xx[,2] 0) ... or more generally for an arbitrary number of columns: which(apply(xx 0, 1, all)) Uwe Ligges On 3/26/06, Akkineni,Vasundhara [EMAIL PROTECTED] wrote: Hello all, I have a matrix object, xx given as below: