Re: [R] Query about extracting subsets from a table

From: jim holtman <jholtman_at_gmail.com>
Date: Tue 23 Jan 2007 - 17:50:04 GMT

Here is how you can do the extraction back to the original input:

data <- data[ data$log10escore < -3, ]

On 1/23/07, lalitha viswanath <lalithaviswanath@yahoo.com> wrote:
> Hi
> I am trying to process tabular data as follows:
>
> Data in the input file is of the form
>
> genome1 genome2 tree-dist log10escore
>
> Genome1 and genome2 are alphabetic.
> Tree-dist and log10escore are numeric.
>
> I wish to extract only those rows from this table
> where the log10escore is less than -3.
>
>
> data <-read.table(filename);
> data$log10escore = data$log10escore[ data$log10escore
> < -3];
>
> I would like to use this pruned list of escores to get
> the corresponding genomenames and treedist.
>
> I did not find anything useful in the FAQs and Notes
> on R for this part of the data extraction.
>
> As I am just beginning programming in R, I would
> appreciate your input about this.
>
> Thanks
> L
>
>
>
> ____________________________________________________________________________________
> Food fight? Enjoy some healthy debate
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>

-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

______________________________________________
R-help@stat.math.ethz.ch 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 Wed Jan 24 04:57:45 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 23 Jan 2007 - 18:30:27 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.