Entering edit mode
6.8 years ago
lessismore
★
1.4k
Dear all,
i have a technical problem, would like to use the merge function maybe in R to merge two tables, one (one column) with gene IDs and the other (2 columns) with gene IDs + respective gene names. There could be the case where i dont have for certain gene IDs the respective gene names. In this case i want in the merged table the original gene ID.
Could you help me? table1
TMCS09g1008676
TMCS09g1008677
TMCS09g1008678
TMCS09g1008679
TMCS09g1008680
TMCS09g1008681
TMCS09g1008682
TMCS09g1008683
table2
TMCS09g1008676 AMC
TMCS09g1008677 BBV
TMCS09g1008678
TMCS09g1008679 BBC
TMCS09g1008680
TMCS09g1008681 AYY
TMCS09g1008682
TMCS09g1008683
wanted table:
AMC
BBV
TMCS09g1008678
BBC
TMCS09g1008680
AYY
TMCS09g1008682
TMCS09g1008683
thanks in advance
Check out the documentation on merge in R https://www.statmethods.net/management/merging.html
If the "GeneID" columns are exactly the same in both dataframes, then use
cbind
.Why is the 3rd row of output "wanted" table is not "BBV" ?
yes sorry i corrected