title: R: How to extract confidence interval from cor.test function
body: <p>Im trying to extract <code>95 percent confidence interval</code> from the result of pearson correlation.</p>
  
  <p>My output looks like this:</p>
  
  <pre><code>Pearson's product-moment correlation
  
  data:  newX[, i] and newY
  t = 2.1253, df = 6810, p-value = 0.0336
  alternative hypothesis: true correlation is not equal to 0
  95 percent confidence interval:
   0.001998576 0.049462864
  sample estimates:
         cor 
  0.02574523 
  </code></pre>
  
  <p>I get it with the following code</p>
  
  <pre><code>t &lt;- apply(FNR[, -1], 2, cor.test, FNR$HDL, method="pearson")
  </code></pre>
  
  <p>I would appreciate any help. Thanks.</p>