title: doing PCA on very large data set in R
body: <p>I have a very large training set (~2Gb) in a CSV file. The file is <strong>too large</strong> to read directly into memory (<code>read.csv()</code> brings the computer to a halt) and I would like to reduce the size of the data file using PCA. The problem is that (as far as I can tell) I need to read the file into memory in order to run a PCA algorithm (e.g., <code>princomp()</code>).</p>
  
  <p>I have tried the <code>bigmemory</code> package to read the file in as a <code>big.matrix</code>, but <code>princomp</code> doesn't function on <code>big.matrix</code> objects and it doesn't seem like <code>big.matrix</code> can be converted into something like a <code>data.frame</code>.</p>
  
  <p><strong>Is there a way of running <code>princomp</code> on a large data file that I'm missing?</strong></p>
  
  <p>I'm a relative novice at R, so some of this may be obvious to more seasoned users (apologies in avance).</p>
  
  <p>Thanks for any info.</p>