Skip to content
Prev 243785 / 398506 Next

The behaviour of read.csv().

On 02/12/2010 8:04 PM, Peter Ehlers wrote:
I think the fill=TRUE option arrived about 10 years ago, in R 1.2.0. 
The comment in the NEWS file suggests it was in response to some strange 
csv file coming out of Excel.

The real problem with the CSV format is that there really isn't a well 
defined standard for it.  The first RFC about it was published in 2005, 
and it doesn't claim to be authoritative.  Excel is kind of a standard, 
but it does some very weird things.  (For example:  enter the string 01 
into a field.  To keep the leading 0, you need to type it as '01.  Save 
the file, read it back:  goodbye 0.  At least that's what a website I 
was just on says about Excel, and what OpenOffice does.)

I've been burned so many times by storing data in .csv files, that I 
just avoid them whenever I can.

Duncan Murdoch