I have two datasets: mydata2 and mydata3
Mydata2: I want 2 columns in it: Destination.DisplayName and Partner.Type
(Partner.Type is based off Destination.DisplayName)
Mydata3: 2 columns in it: If and Then
I need a line of code that tests if Destination.DisplayName is equal to If, and if it is, set partner.type to the value in Then
Right now this is what I have
mydata2$Partner.Type[ mydata2$Destination.DisplayName %in% mydata3$If] = as.character((mydata3$Then[match(mydata2$Destination.DisplayName, mydata3$If)]))