Re: [R] removing rows from matrix

2008-05-02 Thread Richard . Cotton
> Hi, I have a problem regarding matrix handeling. I am working with > a serie of matrixes containing several columns. Now I would like to > delete those rows of the matrixes,that in one of the columns contain > values less than 50 or greater than 1000. Try this: m <- matrix(runif(150, 0, 1050

Re: [R] removing rows from matrix

2008-05-02 Thread Henrique Dallazuanna
Try: x <- matrix(sample(10:1100, 100), 10) x[!apply(x < 50 | x > 1000, 1, any),] On Fri, May 2, 2008 at 6:48 AM, Monna Nygård <[EMAIL PROTECTED]> wrote: > > Hi, I have a problem regarding matrix handeling. I am working with a > serie of matrixes containing several columns. Now I would like to d

[R] removing rows from matrix

2008-05-02 Thread Monna Nygård
Hi, I have a problem regarding matrix handeling. I am working with a serie of matrixes containing several columns. Now I would like to delete those rows of the matrixes,that in one of the columns contain values less than 50 or greater than 1000. How would this be possible, I have tried to crea