First time R programming.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

First time R programming.

This is the first time I post here and I appreciate your help. I have two different large text files: First# a.txt has one column like:


Second one b.txt has three columns with large number of rows:

rs151511    45615614  1
rs4156465   51156155  2
rs15651     15615615  3
rs151655    45615614  1
rs156161    51156155  2
rs122242    15615615  3

I need to write a code which produces a new file "c.txt" which has file#1 list with identical information from file#2 with the below format:

rs151511       45615614  1
rs4156465      51156155  2
rs15651        15615615  3
chr1:1545455   1545455   1

I appreciate your help.