title: R Programming Error in cov.wt(z) : 'x' must contain finite values only
body: <p>I have looked for such a long time, and haven't been able to figure out how to run Principal Component Analysis in R with the csv file I have. I continue to get this error:</p>
  
  <p><code>Error in cov.wt(z) : 'x' must contain finite values only</code></p>
  
  <p>all I have so far is</p>
  
  <pre><code>data &lt;- read.csv("2014 07 24 Pct Chg Variables.csv")
  pca &lt;- princomp(data3, cor=T)
  
  Error in cov.wt(z) : 'x' must contain finite values only
  </code></pre>
  
  <p>I have some <code>""</code> in my csv file, and have tried </p>
  
  <pre><code>data2 &lt;- apply(data, 1, f1)
  data3 &lt;- as.numeric(data2)
  </code></pre>
  
  <p>where <code>f1</code> is a function to apply the mean where the value is a blank. </p>