title: Read certain columns if exist using read.csv.sql from sqldf
body: <p>I have very large csv files (2.3 GB). I only want to read certain columns that could be or could not be there. </p>
  
  <p>I am using the following code that was suggested here 
  <a href="https://stackoverflow.com/questions/5788117/only-read-limited-number-of-columns">Only read limited number of columns</a></p>
  
  <pre><code>library(sqldf) 
  loc &lt;- read.csv.sql("data.csv",
                      sql = "select locID, City, CRESTA, Latitude, Longitude from file",
                      sep = ",")
  </code></pre>
  
  <p>How can I deal with the situation when for example the column "City" is not in the csv?</p>