I'm trying to add a column to a data.frame in R with a look-up table. Essentially I have two data.frames, and both of them have one column which is similar. I need to create a new column in the first data.frame from the reference table, but I don't want to merge the data.frames and create more rows. I need to just add another column in the first data.frame. This makes more sense if you look at the data..
So After the transformation I would like the organism column from the second data.frame to be in the first data.frame where the ORDER.TEST.MNEMONIC is a identical match. This seems like it should be trivial with R but I cannot seem to do it without creating additional rows with a merge. Any ideas are greatly appreciated, thanks
data should look like this...
.
EDIT: I now realize that when you merge with a look-up table and there are multiple references for an element that 'R' will create multiple rows to satisfy each look-up variable. So the reason a merge wasn't giving me the expected result is because 'R' was creating a new row for each look-up variable that meets a specific requirement. Thanks for pushing me in the correct direction.