[R] managing data

From: yohannes alazar <hannesalazar_at_gmail.com>
Date: Sat 17 Jun 2006 - 23:40:47 EST


Dear mailing list, may some one be kind to help me solve following problem.

I am trying to write a code that will combine two tables "x" and "y". The first columns of both tables are unique identification for the rows. The first column of table "X" is a sub set of the first column of "Y". I need to find the matching rows in both tables by looking on their unique identification at the first columns. Table is "X" is (19010 rw, 6 col) and "Y" is (19850 rw, 9 col). Therefore my out put need to be "Z" is (19010rw,15 col). A small example of my input and out put is here below.

Thank you in advance!

input
Table"X""

A,1,2,2
B,2,1,1
C,1,2,2
E,2,2,1
F,2,1,1
H,1,2,2
J,2,1,1
K,2,1,1

Table"Y"

A,GG,CG,
B,CC,TC,
C,CA,AA,
D,AT,TT,
E,AA,AA,
F,CG,CG,
G,CC,CC,
H,GG,GT,
I,GT,TT,
J,AA,AT,
K,AC,CC,

output
Table"Z""

A,1,2,2,A,GG,CG,
B,2,1,1,B,CC,TC,
C,1,2,2,C,CA,AA,
E,2,2,1,E,AA,AA,
F,2,1,1,F,CG,CG,
H,1,2,2,H,GG,GT,
J,2,1,1,J,AA,AT,
K,2,1,1,K,AC,CC,

 Regards Hannes

        [[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 Sat Jun 17 23:47:45 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 Sun 18 Jun 2006 - 02:10:56 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.