title: read.csv vs. read.table
body: <p>I have seen in several cases that while <code>read.table()</code> is not able to read a tab delimited file (for example the annotation table of a microarray) returning the following error:</p>
  
  <pre><code>Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  : 
  line xxx did not have yyy elements
  </code></pre>
  
  <p><code>read.csv()</code> works perfectly on the same file with no errors. I think also the speed of <code>read.csv()</code> is also higher than <code>read.table()</code>. </p>
  
  <p>Even more: <code>read.table()</code> is doing very crazy reading a file of me. It makes this error while reading line 100, but when I copy and paste lines 90 to 110 just after the head of the same file, it still makes error of line 100+21 (new lines copied at the beginning). If there is any problem with that line, why doesn't it report that error while reading the pasted line at the beginning? I confirm that <code>read.csv()</code> reads the same file with no error.</p>
  
  <p>Do you have any idea of why <code>read.table()</code> is unable to read the same files that <code>read.csv()</code> works on it? Also is there any reason to use <code>read.table()</code> in any cases?</p>