Skip to content
Prev 166124 / 398502 Next

for loop and if problem

On Tue, 6 Jan 2009, Sake wrote:

            
This looks like a minor variant on the 'first and last observation' thread 
from a few days ago:

 	http://thread.gmane.org/gmane.comp.lang.r.general/135411

to which several useful solutions were posted.

I suggest you read that thread and try to adapt what is there to your 
situation.

If this does not get you all the way there, when you post back it will 
help to "provide commented, minimal, self-contained, reproducible code".

What you have given us is not quite there.

Here is a start:

  data <-
 	read.csv("http://www.nabble.com/file/p21312449/genlistchrompos.csv",sep=';')

and note that
[1] "Query"             "Gene"              "Chrom"             "Strand"            "Accession"
  [6] "Exon"              "Exon_Start.Chr."   "Exon_Stop.Chr."    "Exon_Start.Trans." "Exon_Stop.Trans."

does not include anything like "Column 'B'", so refer to those column 
names if you need further help after studying the thread above.

HTH,

Chuck
Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901