In that case, I think you can look into "string distances" or Natural Language Processing (NLP) in general, here is an example of the use of string distances to identify near duplicates
This would be one way to do it
library(tidystringdist)
library(tidyverse)
# Sample data
df <- data.frame(stringsAsFactors = FALSE,
Name = as.factor(c(" CANON PVT. LTD ", " Antila,Thomas ", " Greg ",
" St.Luke's Hospital ", " Z_SANDSTONE COOLING LTD ",
" St.Luke's Hospital ", " CANON PVT. LTD. ",
" SANDSTONE COOLING LTD ", " Greg ", " ANTILA,THOMAS ")),
City = as.factor(c(" Georgia ", " Georgia ", " Georgia ", " Georgia ",
" Georgia ", " Georgia ", " Georgia ", " Georgia ",
" Georgia ", " Georgia "))
)
match <- df %>%
tidy_comb_all(Name) %>%
tidy_stringdist() %>%
filter(so…