I have very large csv files (2.3 GB). I only want to read certain columns that could be or could not be there.
I am using the following code that was suggested here Only read limited number of columns
library(sqldf)
loc <- read.csv.sql("data.csv",
sql = "select locID, City, CRESTA, Latitude, Longitude from file",
sep = ",")
How can I deal with the situation when for example the column "City" is not in the csv?