I have 2 datasets with name. One with exact names and the other with exact and modified names
dt_t <- data.table(Name = list("Aaron RAMSEY", "Mesut OEZIL", "Sergio AGUERO"))
dt_f <- data.table(Name = list("Özil Mesut", "Ramsey Aaron", "Kun Agüero"))
I was thinking of making a table with dt_t in line and dt_f in column with the value of the jarowinkler function (which allows to calculate the similarity of a string) so that dt_f[i] is replaced by the dt_t[i] which has the highest jarowinkler value.
But I don't know how to do it, mutch less if it's possible.
Any idea are welcome
Thanks
Here is a solution using
adist
:Edit ---------------------------------
Applying it row-wise: