According to these SO questions here and here (and my own painful experience), read.table
and read.csv
seem incapable of ingesting escaped quotes that are within quoted text.
Ideally, I'd like to use the same function to ingest both:
"column value 1","column \" value 2", NA, "column value 4"
And
column value 1, column \" value 2, NA, column value 4
Are there any alternatives to these functions that can read in escaped quotes within quoted text in R?
The solutions provided to the previous questions seem to require dangerous assumptions about what else is in the text (i.e., it's always quoted, or it never has single quotes), and having a function that can process CSVs with or without quoted columns would be hugely helpful.