I saved an Excel table as text (*.txt). Unfortunately, Excel don't let me choose the encoding. So I need to open it in Notepad (which opens as ANSI) and save it as UTF-8. Then, when I read it in R:
data <- read.csv("my_file.txt",header=TRUE,sep="\t",encoding="UTF-8")
it shows the name of the first column beginning with "X.U.FEFF.". I know these are the bytes reserved to tell any program that the file is in UTF-8 format. So it shouldn't appear as text! Is this a bug? Or am I missing some option? Thanks in advance!
read.csv
argumentcheck.names=FALSE
. Note that if you use this, you will not be able to directly reference columns with the$
notation. – Lunnayourdf$"first col"
– Lunna