I have a dataframe with Name1 (10 observations), and Name2, with 3 observations. I have the following toy example:
Name1 Name2
Acadian Hospitals Wellington
Bridgewater Trust Associates Zeus
Concordia Consulting Acadian
Wellington Corporation LLC .
Wellington Wealth Management .
Prime Acadian Charity
If Name1 is able to match a part of its string in Name2, I want the output in column3 to be TRUE.
Currently, my code only works the other way around, using pmatch
My final output should look like this:
Name1 Name2 Is_Matched
Acadian Hospitals Wellington TRUE
Bridgewater Trust Associates Zeus FALSE
Concordia Consulting Acadian FALSE
Wellington Corporation LLC . TRUE
Wellington Wealth Management . TRUE
Prime Acadian Charity . TRUE
TRUE, do they denote missing data, or are accidentally true inIs_Matched?FALSEin the Is_Matched column?