[R] The behaviour of read.csv().

Rolf Turner r.turner at auckland.ac.nz
Fri Dec 3 02:34:07 CET 2010


On 3/12/2010, at 2:04 PM, Peter Ehlers wrote:

	<SNIP>

> Rolf,
> This is not to argue with your point re counter-intuitive,
> but I always run a count.fields() first if I haven't seen
> (or can't easily see) the file in my editor. I must have
> learned that the hard way a long time ago.


Sound advice!  Thanks.  I'd just like to point out however
that it might be an idea to set quote="\"" in the call to
count.fields() --- to make its idea of how many fields there
are consistent with that of read.csv().  In count.fields()
quote defaults to "\"'" whereas in read.csv() it defaults
to "\"".

	cheers,

		Rolf



More information about the R-help mailing list