I have one dataset and multiple other subdatasets, different in size which all have key ID column to link with each other. What I want to do is just copy values from subdatasets into main one everytime in new column with just calling the dataframe and specific column names of subdatasets. I know it's just simple LOOKUP formula in Excel, but due to large size of data I have to do it in R (I have looked for similar questions here but could not find quite exactly what I was looking for). For example:
> dfmain > dfsub1 > dfsub2 > dfmain
carID carID carsize carID carcapacity carID carsize carcapacity
1 1 Small 1 41 1 Small 41
1 2 Compact 2 56 1 Small 41
1 >>>>>>>>>> 1 Small 41
2 2 Compact 56
2 2 Compact 56