sqldf, csv, and fields containing commas
问题 Took me a while to figure this out. So, I am answering my own question. You have some .csv, you want to load it fast, you want to use the sqldf package. Your usual code is irritated by a few annoying fields. Example: 1001, Amy,9:43:00, 99.2 1002,"Ben,Jr",9:43:00, 99.2 1003,"Ben,Sr",9:44:00, 99.3 This code only works on *nix systems. library(sqldf) system("touch temp.csv") system("echo '1001, Amy,9:43:00, 99.2\n1002,\"Ben,Jr\",9:43:00, 99.2\n1003,\"Ben,Sr\",9:44:00, 99.3' > temp.csv") If try