I hope this isn't considered a duplicate question; I can't seem to figure it out. I have multiple tables that I'm trying to join together, by essentially doing a VLookup. That's how I would do it in Excel anyway.
I have 2 SQL data sets that are combined in this fashion.
Combined <- rbind(FGD, FNK)
In this Combined data set, I am trying to do a VLookup to the field named 'Category' and in another data set, named 'Category' I also have a field named 'Category'. This comes from an Excel file.
I tried this:
merge(Combined.Category, Category.Category, all=TRUE)
I just got this error.
Error in merge(Combined.Category, Category.Category, all = TRUE) :
object 'Combined.Category' not found
Isn't it like this? merge(Table1.Field1, Table2.Field2, all=TRUE)
Also, to make this a bit more complex, I want to do a VLookup to Category.Category and if no match is found, do another VLookup to Category.DES.
How can I do that? I'm pretty sure there is a way to do this, but I don't really know how to approach this kind of thing.