[BioC] Searching for data in data.frames

michael watson (IAH-C) michael.watson at bbsrc.ac.uk
Fri Apr 21 16:00:54 CEST 2006


Try

my.data.frame[grep("search term", my.data.frame$column.name),] 

-----Original Message-----
From: bioconductor-bounces at stat.math.ethz.ch
[mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of
J.delasHeras at ed.ac.uk
Sent: 21 April 2006 14:55
To: bioconductor at stat.math.ethz.ch
Subject: [BioC] Searching for data in data.frames


This may be a very basic question, but I am looking in the R manual and
I haven't found the right function... and I am sure it must exist
already. So I apologise in advance if I seem to be blind or missing
something! :)

What I am after is very simple. I am using Limma and I have a number of
data frames (RGList, MAList, MArrayLM...). Sometimes I just want to
locate the data for a particular gene, or where a particular value for M
occurs, etc.

I want to find, for instance, all occurrences of "COL6A3" in RG$genes,
and return the position of those occurrences, for instance 345, 7840,
15003. Then I can use that information to give me the foreground
intensities corresponding to that gene for any given slide.

I came across the function "subset" which seems like it would serve my
purpose (or could be adapted to serve my purpose), but I get errors no
matter what I do...

I appreciate this must be a pretty basic question, but... I have spent
the last hour searching for this and so far no luck. I was going to just
write a simple search function, but there must be already a function
already defined.

Thanks!

Jose

-- 
Dr. Jose I. de las Heras                      Email:
J.delasHeras at ed.ac.uk
The Wellcome Trust Centre for Cell Biology    Phone: +44 (0)131 6513374
Institute for Cell & Molecular Biology        Fax:   +44 (0)131 6507360
Swann Building, Mayfield Road
University of Edinburgh
Edinburgh EH9 3JR
UK

_______________________________________________
Bioconductor mailing list
Bioconductor at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives:
http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list