dplyr string match and replace based on lookup table in R
问题 I'm trying to achieve a function that I previously did in Excel, but having trouble finding a means to achieve it. I have two datasets: one is my base dataset and the other is a lookup table. My base has two columns, the first and last names of people. My lookup table has these first two columns as well, but it also includes a replacement first name. People <- data.frame( Fname = c("Tom","Tom","Jerry","Ben","Rod","John","Perry","Rod"), Sname = c("Harper","Kingston","Ribery","Ghazali","Baker",