[Rd] read.csv and FileEncoding in Windows version of R 2.13.0

From: Alexander Peterhansl <APeterhansl_at_GAINCapital.com>
Date: Wed, 01 Jun 2011 22:00:30 +0000

Dear R-devel List:

read.csv() seems to have changed in R version 2.13.0 as compared to version 2.12.2 when reading in simple CSV files.

Suppose I read in a 2-column CSV file ("test.csv"), say 1, a
2, b

If file is encoded as UTF-8 (on Windows 7), then under R 2.13.0 read.csv("test.csv",fileEncoding="UTF-8",header=FALSE) yields the following output   V1
1 ?
Warning messages:
1: In read.table(file = file, header = header, sep = sep, quote = quote, :   invalid input found on input connection 'test.csv' 2: In read.table(file = file, header = header, sep = sep, quote = quote, :   incomplete final line found by readTableHeader on 'test.csv'

Under R 2.12.2 it runs problem-free and yields the expected:   V1 V2
1 1 a
2 2 b

Please help.


        [[alternative HTML version deleted]]

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 01 Jun 2011 - 22:55:28 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 Thu 02 Jun 2011 - 00:10:14 GMT.

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

list of date sections of archive