I have two R data files (rda format), the first one is an edge list and contains only id numbers, the second one contains ids and names. I need to match the names from the second file to the ids in the first one, or just replace them. Which command should I use for that?
Here is how the first file looks like:
one <- data.frame(X1=c("id1","id1"),X2=c("id2","id3"))
X1 X2
1 id1 id2
2 id1 id3
Here is the second one:
two <- data.frame(User=c("g79","kian","greyracer"),ID=c("id1","id2","id3"))
User ID
1 g79 id1
2 kian id2
3 greyracer id3
Thanks in advance!