Here's a figure to illustrate, since I couldn't reproduce with dput and dump. I tried using for() loop in combination with a match or %in%, but I just couldn't get through in time.
I want to match ID from df1 with ACCESSION in df2, and then replace "NA" in df1 with GENE_SYMBOL from df2.
The values are not in the same order, and their columns have different sizes. Thus, I believe that I should use a combination of for loops + match or something.