I need to join two tables on the colum name
. They come from different excel spreadsheets which I didn't create. I imported both sheets into R
tables using the function read.xls
from the gdata
package.
Sometimes the names contains umlauts and other accents. They appear identical within the excel sheets but when I import them into R they are not the same. Hence my join doesn't join. I join using the sqldf
function.
As an example : I see Lück
in the two spreadsheets. In table1 of R this appears as L\374ck
whereas in table2 it appears as L\303\274ck
.
How can I best solve this problem? Is there a way to force an encoding when data is imported? Or should one try to force the comparison of strings in a different way?