I am having some problems in reading a csv file with R.
x=read.csv(\"LorenzoFerrone.csv\",header=T)
Error in make.names(col.names, unique = TRUE) :
inva
The cause is an invalid encoding. I have solved replacing all the "è" with e
I know this is an old post, but just wanted to say to non-English natives, that if you use "," as decimal seperator,
Typically an encoding issue. You can try to change encoding or else deleting the offending character (just use your favorite editor and replace all instances). In some cases R will spit the char location, for example:
invalid multibyte string 1847
Which should make your life easier. Also note that you may be required to repeat this process several times (deleting all offending characters or trying several encodings).
Not sure if this helps, just had a similar issue which I solved by removing " from the csv I was trying to import. The first row of the database had the column names written as "colname","colname2","etc" and I removed all the " and the csv was read in R just fine then.
You need to specify the correct delimiter in the sep
argument.
I found this problem is caused by code of file, and I solved that by opening it with Windows note, saving with UTF-8, and reopening with Excel(it became garbled at first), and resaving with UTF-8, then it worked!