I'm using stringsim to compare all the names of two lists, and I want to know for each name in x2, who from the list x1 is the one with the highest string similarity (the name and the number of similarity)

```
library(stringdist)
library(data.table)

a= data.frame(x1=c("RODRIGO ENRIQUE SANCHEZ TORRES", "MOISES AVELARDO HERRERA", "ALBERTA REDOBLE AVENDAÑO", "JAVIERA IGNACIA DOMINGUEZ FIGUEROA "))

x2=c("RODRIGO MANRIQUEZ MANRIQUEZ", "MOISES AVELARDO HERRERA","JESUS FIGUEROA", "ALFREDO MARIN OSSA")

sapply(a$x1, function(x){stringsim(x,x2,method='jw')})

          [,1]      [,2]      [,3]      [,4]
[1,] 0.7608025 0.5781190 0.5007015 0.6373898
[2,] 0.6313441 1.0000000 0.6416063 0.5386128
[3,] 0.5325397 0.5299057 0.4206349 0.5166667
[4,] 0.6159544 0.7062802 0.6136040 0.5587302

```

I want something like that

```
Name                              percentage     best_match
RODRIGO ENRIQUE SANCHEZ TORRES    0.7608025      RODRIGO MANRIQUEZ MANRIQUEZ
MOISES AVELARDO HERRERA           1.0000000      MOISES AVELARDO HERRERA 

```