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 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 > create a simple function for this, but I just don't seem to get it > right.Thank you so much for your help, Monna > _________________________________________________________________ > [[elided Hotmail spam]] > > PLink > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.