From ggrothendieck at gmail.com  Sun Jun 14 20:56:01 2009
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Sun, 14 Jun 2009 14:56:01 -0400
Subject: [Rd] read.csv
Message-ID: <971536df0906141156j78b5570ajf08257c88098d7d8@mail.gmail.com>

If read.csv's colClasses= argument is NOT used then read.csv accepts
double quoted numerics:

1: > read.csv(stdin())
0: A,B
1: "1",1
2: "2",2
3:
  A B
1 1 1
2 2 2

However, if colClasses is used then it seems that it does not:

> read.csv(stdin(), colClasses = "numeric")
0: A,B
1: "1",1
2: "2",2
3:
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  :
  scan() expected 'a real', got '"1"'

Is this really intended?  I would have expected that a csv file in which
each field is surrounded with double quotes is acceptable in both
cases.   This may be documented as is yet seems undesirable from
both a consistency viewpoint and the viewpoint that it should be
possible to double quote fields in a csv file.



[Rd] read.csv
Gabor Grothendieck