Re: [R] Strange csv parsing problem

2010-04-08 Thread Peter Ehlers
On 2010-04-08 9:10, Hadley Wickham wrote: Remove the comma and count.fields gives 11 for all rows. From your other post(s) on escaped quotes, I assume that this won't solve your problem with the existing files. (: Right - but assuming I'm not crazy, that should cause an error in read.csv, righ

Re: [R] Strange csv parsing problem

2010-04-08 Thread Hadley Wickham
> Remove the comma and count.fields gives 11 for all rows. > From your other post(s) on escaped quotes, I assume that > this won't solve your problem with the existing files. (: Right - but assuming I'm not crazy, that should cause an error in read.csv, right? It shouldn't just parse the file reg

Re: [R] Strange csv parsing problem

2010-04-08 Thread Peter Ehlers
Hadley, The cause of the count.fields result is the comma in 'nftc,%20' at about column 300 (for me). Since commas between quotes should normally not matter, this must be due to the comma appearing inside escaped quotes, i.e. we have: "abc\"def,ghi\"jkl". Remove the comma and count.fields gives

[R] Strange csv parsing problem

2010-04-07 Thread Hadley Wickham
> url <- "http://dl.dropbox.com/u/41902/22240.csv"; > > read.csv(url)[, 1] [1] "oppose" NA"oppose" "support" > read.csv(url, header = F)[, 1] [1] "url" [2] "http://maplight.org/us-congress/bill/109-hr-5825/387248"; [3] "http://maplight.org/us-congress/bill/110-hr-3546/378743"; [4] "http:/