Re: [R] Replace any values in a data frame based on another data frame

2016-07-30 Thread Jeff Newmiller
Your use of HTML email corrupted your example slightly, but I was able to fix it. Please follow the Posting Guide and set your emails to Plain Text mode when posting to this mailing list in the future. Here is one way: # you have to be careful about mucking with factors # convert columns to fa

Re: [R] Replace any values in a data frame based on another data frame

2016-07-30 Thread Bert Gunter
Marine: Thanks for the reproducible example. I would not have fooled with this otherwise! 1. First note that your specification that you wish to replace only those values in col3 and col4 of df1 that don't match with those of df2 is irrelevant: if you replace those that do match you don't change