title: How can I calculate percent variance of eigenvectors in R?
body: <p>I need to calculate the percent variance of the eigenvectors (eigenvals) shown below. I have also included the commands I have used to get the results that I have so far: </p>
  
  <pre><code>colMeans(Chu_data2)
  
  ##          V1          V2          V3          V4          V5          V6 
  ## -0.11900458 -0.21401111 -0.09612128 -0.11873978 -0.00745832 -0.03254005 
  ##          V7 
  ## -0.02472377
  
  colMedians(Chu_data2)
  
  ## [1] -0.12 -0.18 -0.10 -0.17 -0.10 -0.10 -0.13
  
  colVars(Chu_data2)
  
  ## [1] 0.02940187 0.36919574 0.26928803 0.42775589 0.73665904 0.55204203
  ## [7] 0.59568623
  
  pc = prcomp(Chu_data2)
  summary(pc)
  
  ## Importance of components:
  ##                           PC1    PC2     PC3     PC4     PC5     PC6
  ## Standard deviation     1.5143 0.6333 0.36356 0.24374 0.20140 0.16983
  ## Proportion of Variance 0.7694 0.1346 0.04435 0.01994 0.01361 0.00968
  ## Cumulative Proportion  0.7694 0.9040 0.94837 0.96831 0.98192 0.99160
  ##                           PC7
  ## Standard deviation     0.1582
  ## Proportion of Variance 0.0084
  ## Cumulative Proportion  1.0000
  
  eigenvals &lt;- pc$sdev^2
  eigenvals
  
  ## [1] 2.29299111 0.40101764 0.13217381 0.05940873 0.04056253 0.02884208
  [7] 0.02503294
  </code></pre>
  
  <p>Any help is appreciated! Thank you.</p>