I'm attempting to merge two dataframes. One dataframe contains rownames which appear as values within a column of another dataframe. I would like to append a single column (Top.Viral.TaxID.Name) from the second dataframe based upon these mutual values, to the first dataframe.
The first dataframe looks like this:
         ERR1780367  ERR1780369  ERR2013703    xxx...    
374840      73          0            0                      
417290      56          57           20                      
1923444     57          20           102                     
349409      40          0            0                      
265522      353         401          22                       
322019      175         231          35                       
The second dataframe looks like this:
       Top.Viral.TaxID       Top.Viral.TaxID.Name
1        374840              Enterobacteria phage phiX174 sensu lato
2        417290              Saccharopolyspora erythraea prophage pSE211
3        1923444             Shahe picorna-like virus 14
4        417290              Saccharopolyspora erythraea prophage pSE211
5        981323              Gordonia phage GTE2
6        349409              Pandoravirus dulcis
However, I would also like to preserve the rownames of the first dataframe, so the result would look something like this:
         ERR1780367  ERR1780369  ERR2013703    xxx...    Top.Viral.TaxID.Name
374840      73          0            0                   Enterobacteria phage phiX174 sensu lato
417290      56          57           20                  Saccharopolyspora erythraea prophage pSE211            
1923444     57          20           102                 Shahe picorna-like virus 14     
349409      40          0            0                   Pandoravirus dulcis   
265522      353         401          22                  Hyposoter fugitivus ichnovirus     
322019      175         231          35                  Acanthocystis turfacea Chlorella virus 1    
Thanks in advance.
 
     
    