[R] Help with making Loop
fazal.hadi at curie.fr
Fri May 1 22:05:22 CEST 2015
I am a real beginner to R and have probably a very naive issue. I've a small data frame with three columns: Unique Sample ID, Gene 1 and Gene 2 (the columns on Gene1 and Gene2 are empty). I have two separate tables for the genes which contain the Unique Subject ID in one column and information on whether the gene is mutated or not in that particular subject (M, N/M) in another column called (Condition). I want to make a loop which can read the Unique Subject ID from my data frame, then look up for the same ID in the two tables and depending on whether the gene is mutated (M)/not mutated (N/M), inserts Yes like emoticon / No (N) in the appropriate gene column (Gene1/Gene2) for each Subject ID.
If anyone can help, I would really appreciate
Thanks in advance
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6717 bytes
More information about the R-help