title: How to reduce the number of attributes to 20 using prcomp in R?
body: <p>I have a 104 attribute dataset called <code>data</code>. I want to reduce the number of attributes to 20 using <code>prcomp</code> function in R.</p>
  
  <p>I did this:</p>
  
  <pre><code>pr = prcomp(data)
  </code></pre>
  
  <p>But <code>pr</code> only contains an instance of the <code>prcomp</code> class. How do I reduce the number of attributes in the original dataset to 20?</p>