[R] Query about extracting subsets from a table
jholtman at gmail.com
Tue Jan 23 18:50:04 CET 2007
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 at yahoo.com> wrote:
> 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.
> Food fight? Enjoy some healthy debate
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
+1 513 646 9390
What is the problem you are trying to solve?
More information about the R-help