how to match tables
2
0
Entering edit mode
@dr-gyorffy-balazs-619
Last seen 9.6 years ago
Hi All, This would be extremely easy in Access, but should be manageable in R too :-) I have two tables, which are the annotation files for two platforms. I have one common identifier, the ”probenames”, which is used in both tables. I would like combine table 1 and table 2 into table 3. The ”match” is not good, since it gives only the first match. I have multiple entries in table 2, but only singe entries in table 1. Table 2 has only 2 columns, but table 1 has several. Some of the entries in table 1 do not have a matched enrty in table 2. Example: Table 1:  probename gene value 1 1007_s_at geneX valueX 2 1012_s_at geneY valueY 3 1117_s_at geneZ valueZ Table2:  probename description 1 1012_s_at something1 2 1012_s_at something2 3 1117_s_at something3 4 1117_s_at something4 Table 3 should be:  probename gene value description 1 1007_s_at geneX valueX NA 2 1012_s_at geneY valueY something1 3 1012_s_at geneY valueY something2 4 1117_s_at geneZ valueZ something3 5 1117_s_at geneZ valueZ something4 Thanks for any help: Balazs __________________________________________________________ Dem pfiffigeren Posteingang. [[alternative HTML version deleted]]
Annotation Annotation • 772 views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
On Mon, Jul 14, 2008 at 3:32 PM, Dr Balazs Gyorffy <zsalab2 at="" yahoo.com=""> wrote: > Hi All, > > This would be extremely easy in Access, but should be manageable in R too :-) > > I have two tables, which are the annotation files for two platforms. I have one common identifier, the "probenames", which is used in both tables. I would like combine table 1 and table 2 into table 3. The "match" is not good, since it gives only the first match. I have multiple entries in table 2, but only singe entries in table 1. Table 2 has only 2 columns, but table 1 has several. Some of the entries in table 1 do not have a matched enrty in table 2. > > Example: > > Table 1: > probename gene value > 1 1007_s_at geneX valueX > 2 1012_s_at geneY valueY > 3 1117_s_at geneZ valueZ > > Table2: > probename description > 1 1012_s_at something1 > 2 1012_s_at something2 > 3 1117_s_at something3 > 4 1117_s_at something4 > > Table 3 should be: > probename gene value description > 1 1007_s_at geneX valueX NA > 2 1012_s_at geneY valueY something1 > 3 1012_s_at geneY valueY something2 > 4 1117_s_at geneZ valueZ something3 > 5 1117_s_at geneZ valueZ something4 Hi, Balazs. See the merge() function. Sean
ADD COMMENT
0
Entering edit mode
@wolfgang-huber-3550
Last seen 18 days ago
EMBL European Molecular Biology Laborat…
Dear Balasz, try ? merge Best wishes Wolfgang - ---------------------------------------------------- Wolfgang Huber, EMBL-EBI, http://www.ebi.ac.uk/huber Dr Balazs Gyorffy wrote: > Hi All, > > This would be extremely easy in Access, but should be manageable in R too :-) > > I have two tables, which are the annotation files for two platforms. I have one common identifier, the ???probenames???, which is used in both tables. I would like combine table 1 and table 2 into table 3. The ???match??? is not good, since it gives only the first match. I have multiple entries in table 2, but only singe entries in table 1. Table 2 has only 2 columns, but table 1 has several. Some of the entries in table 1 do not have a matched enrty in table 2. > > Example: > > Table 1: > ? probename gene value > 1 1007_s_at geneX valueX > 2 1012_s_at geneY valueY > 3 1117_s_at geneZ valueZ > > Table2: > ? probename description > 1 1012_s_at something1 > 2 1012_s_at something2 > 3 1117_s_at something3 > 4 1117_s_at something4 > > Table 3 should be: > ? probename gene value description > 1 1007_s_at geneX valueX NA > 2 1012_s_at geneY valueY something1 > 3 1012_s_at geneY valueY something2 > 4 1117_s_at geneZ valueZ something3 > 5 1117_s_at geneZ valueZ something4 > > Thanks for any help: > Balazs > > > > __________________________________________________________ > > Dem pfiffigeren Posteingang. > > [[alternative HTML version deleted]] > > > > -------------------------------------------------------------------- ---- > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT

Login before adding your answer.

Traffic: 1032 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6