Re: [R] test individual values in rows

From: Gabor Csardi <csardi_at_rmki.kfki.hu>
Date: Fri, 14 Mar 2008 14:34:36 +0100

keep <- apply( DATA, 1, min ) >= 100
DATA <- DATA[ keep, ]

See ?apply for more.

Gabor

On Fri, Mar 14, 2008 at 01:26:49PM +0000, IAIN GALLAGHER wrote:
> Hi list.
>
> I have a numerical dataset 22,000 rows deep and 43 columns wide. I would like to remove those rows which contain only values less than 100 (ie if any value in the row is greater than 100 the row stays in the dataset). I am unsure how to test each individual value across the rows and then identify the rows which meet my criteria.
>
> Can anyone help?
>
> Thank you.
>
> Iain
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_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.

-- 
Csardi Gabor <csardi_at_rmki.kfki.hu>    UNIL DGM

______________________________________________
R-help_at_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.
Received on Fri 14 Mar 2008 - 13:47:11 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 14 Mar 2008 - 14:30:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive