[BioC] how to match tables
Wolfgang Huber
huber at ebi.ac.uk
Mon Jul 14 22:06:30 CEST 2008
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
More information about the Bioconductor
mailing list