title: problem with specifying colClasses in read.csv in R
body: <p>I am trying to specify colClasses in read.csv in an attempt to speed up the reading of csv file. However, I encounter the following problem:</p>
  
  <p>assuming that i have a file called "t.csv":</p>
  
  <pre><code>"a","b"
  "x","0"
  </code></pre>
  
  <p>Then, if I run the following in R:</p>
  
  <pre><code>data &lt;- read.csv('t.csv' , stringsAsFactors=FALSE, check.names=FALSE , comment.char='', colClasses= c('character','numeric') )
  </code></pre>
  
  <p>I got this error:</p>
  
  <pre><code>Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  : 
    scan() expected 'a real', got '"0"'
  </code></pre>
  
  <p>At first I thought it was the problem with my quote. But using quote='"' in read.csv didn't help.</p>