R - CSV file with commas embedded in fields

In the previous post, I compared the execution speed of two R functions: “readlines()” vs “read.csv()”. The second being the slowest in the case I was dealing with. However, I just found a utility to use the latest.

While working on a new dataset (the one from “globaldothealth” about Monkeypox), I encountered a .CSV file with commas embedded in fields. Of course “readlines()” which I used with ‘,’ as a delimiter was lost.

So I learned two things (shame on me)

  1. I should have read RFC 4180 (https://www.ietf.org/rfc/rfc4180.txt)
  2. The R function “read .csv()” handles this perfectly.

Regards