I import data from an Excel file into R. This file contains some strange space that neither R nor Excel detects it. What I mean by "strange space" is some form of double space but when I do Ctrl+F in Excel and search for double space using space bar in the key board, Excel can't detect it. I found out more about this strange space from this article:
https://www.auditexcel.co.za/blog/excel-not-recognizing-spaces/
Then the problem for me is that how can I replace this double space with proper single space in R?
I tried the following but not working:
table$var1 <- gsub(" +"," ",table$var1)
table$var1 <- gsub(" "," ",table$var1)
table$var1 <- sub(" "," ",table$var1)
Which I guess is predictable because it is probably not double space, it just looks like one.
Anyone come across anything like this before? I wish I can just manually fix the Excel file like that the author says in the URL above but I have a couple of hundreds of Excel files that I need to fix in this case :(