[R] editing a big file

From: yohannes alazar <hannesalazar_at_gmail.com>
Date: Tue 23 May 2006 - 04:55:09 EST


I have a file that has 90 columns and 20,000 rows and looks like

   C/G CC GG CG G/T GG TT GT C/T CC TT CT A/G AA GG AG A/C AA CC AC A/T AA TT AT

I want to write a code that will read through each row first the first looks at the first column and then replace the three columns with 12 if it is the same as the first column e.g. third column 11 if it is a repeat of the first alphabet like the second column and 22 if it a repeat of the second alphabet.

Can you please give some hint how I can start coding for this, like command names, I am not a programmer and an R beginner. my out put should look like this

   11 22 12 11 22 12 11 22 12 11 22 12 11 22 12 11 22 12

Thank you in advance.

        [[alternative HTML version deleted]]



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 Received on Tue May 23 04:59:28 2006

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 May 2006 - 12:10:19 EST.

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