I have two Data frames. The first one is jobs:
Jobs <- data.frame(Company = c("A","B"), Name = c("Peter","Peter"), Job = c("CEO","Member of the Board"))
The Second one is Media_Appearence:
Media_Appearence <- data.frame(Company = c("A","A","B","B","A","A","A","A"),Name = c("Peter","Peter","Peter","Peter","Peter","Peter","Peter","Peter"))
Is there any way, using basic R commands,to insert a new column on Media_Appearence filling it using matching arguments (Checking First two columns anda returning the matching job) ? The desired output would be:
Media_Appearence <- data.frame(Company = c("A","A","B","B","A","A","A","A"),Name = c("Peter","Peter","Peter","Peter","Peter","Peter","Peter","Peter"),Job= c("CEO","CEO","Member of the Board","Member of the Board","CEO","CEO","CEO","CEO"))
Already tried to merge but results were messy.
Thanks