[R] Selecting out certain values from a MATRIX

2006-04-04 Thread mark salsburg
I have two objects, one matrix and one vector. I want to use my vector to subset certain values out of my matrix. For example: I want to tell R, to select out all rows in myMatrix into a new myMatrix2 IF that corresponding row is less than a 0.5 in myVector. So: myMatrix = a matrix of 8000 by

Re: [R] Selecting out certain values from a MATRIX

2006-04-04 Thread mark salsburg
Thank you Dr. Burns, I tried that, but I don't think it accomplishes what I intended. Let me try to explain better. I have myMatrixmyMatrix2 (8000 by 20) (8000 by 1) myMatrix2 is the variance across the rows of myMatrix. I want to subset

Re: [R] Selecting out certain values from a MATRIX

2006-04-04 Thread Phil Spector
myMatrix[myVector .5,] or subset(myMatrix,myVector .5) - Phil Spector Statistical Computing Facility Department of Statistics UC