[R] Reading .csv file under linux

From: David Scott <d.scott_at_auckland.ac.nz>
Date: Wed, 23 Jan 2008 11:05:09 +1300 (NZDT)

I have encountered a problem with reading a .csv file on a linux box. I can read the file on my windows machine (under XP) but on the linux box it gives :

> patients <- read.csv("../Patients.csv", header = FALSE,

+                      col.names = patientsNames)
Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, na.strings = character(0)) :

   invalid multibyte string
Calls: read.csv -> read.table -> type.convert Execution halted

I am running R 2.6.1 on both machines. I tried on another linux box running 2.5.1 and got the same problem

I am guessing it is something to do with the character encoding. On the linux box I have


Any advice would be welcome

David Scott

David Scott	Department of Statistics, Tamaki Campus
 		The University of Auckland, PB 92019
 		Auckland 1142,    NEW ZEALAND
Phone: +64 9 373 7599 ext 86830		Fax: +64 9 373 7000
Email:	d.scott_at_auckland.ac.nz

Graduate Officer, Department of Statistics Director of Consulting, Department of Statistics

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 22 Jan 2008 - 22:07:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 Jan 2008 - 23:30:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive