[R] read.csv error: invalid multibyte string

Milan Bouchet-Valat nalimilan at club.fr
Sun Feb 19 13:17:29 CET 2012

Le samedi 31 décembre 2011 à 07:05 -0800, Dennis Fisher a écrit :
> R version: 2.13.1
> OS X
> Colleagues,
> I am working with a CSV file; for testing purposes, I created an XLS version of the file.  
> When I read these files using read.xls (gdata) or read.csv, I encounter an error:
> 	Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, na.strings = character(0L)) : 
> 	  invalid multibyte string at '<b0>C'
> The error occurs whether or not I invoke the "as.is" option of read.csv.
Please provide the output of sessionInfo(). I know that on OS X JGR
often (always?) gets the locale wrong, which leads to bugs when
importing any non-ASCII character strings. That's maybe what you're
experiencing. Have you tried with the default R GUI?

Hope this helps

More information about the R-help mailing list