title: Quickly reading very large tables as dataframes
body: <p>I have very large tables (30 million rows) that I would like to load as a dataframes in R.  <code>read.table()</code> has a lot of convenient features, but it seems like there is a lot of logic in the implementation that would slow things down.  In my case, I am assuming I know the types of the columns ahead of time, the table does not contain any column headers or row names, and does not have any pathological characters that I have to worry about.</p>
  
  <p>I know that reading in a table as a list using <code>scan()</code> can be quite fast, e.g.:</p>
  
  <pre><code>datalist &lt;- scan('myfile',sep='\t',list(url='',popularity=0,mintime=0,maxtime=0)))
  </code></pre>
  
  <p>But some of my attempts to convert this to a dataframe appear to decrease the performance of the above by a factor of 6:</p>
  
  <pre><code>df &lt;- as.data.frame(scan('myfile',sep='\t',list(url='',popularity=0,mintime=0,maxtime=0))))
  </code></pre>
  
  <p>Is there a better way of doing this?  Or quite possibly completely different approach to the problem?</p>