[R] Exceptional slowness with read.csv

Eberhard W Lisse no@p@m @end|ng |rom ||@@e@NA
Tue Apr 9 01:17:22 CEST 2024


I find QSV very helpful.

el

On 08/04/2024 22:21, Dave Dixon wrote:
> I solved the mystery, but not the problem. The problem is that
> there's an unclosed quote somewhere in those 5 additional records I'm
> trying to access. So read.csv is reading million-character fields.
> It's slow at that. That mystery solved.
> 
> However, the the problem persists: how to fix what is obvious to the
> naked eye - a quote not adjacent to a comma - but that read.csv
> can't handle. readLines followed by read.csv(text= ) works great
> because, in that case, read.csv knows where the record terminates.
> Meaning, read.csv throws an exception that I can catch and handle
> with a quick and clean regex expression.
> 
> Thanks, I'll take a look at vroom.
[...]



More information about the R-help mailing list