title: Creating correlation matrix p values
body: <p>I can get correlation matrix using following commands: </p>
  
  <pre><code>&gt; df&lt;-data.frame(x=c(5,6,5,9,4,2,1,3,5,7),y=c(3.1,2.5,3.8,5.4,6.5,2.5,1.5,8.1,7.1,6.1),z=c(5,6,4,9,2,4,1,6,2,4))
  &gt; cor(df)
             x         y        z
  x  1.0000000 0.2923939 0.6566866
  y  0.2923939 1.0000000 0.1167084
  z 0.6566866 0.1167084 1.0000000
  &gt;
  </code></pre>
  
  <p>I can get individual p-values using command: </p>
  
  <pre><code>&gt; cor.test(x,y)$p.value
  [1] 0.4123234
  </code></pre>
  
  <p>How can I get a matrix of p-values for all these correlation coefficients? Thanks for your help.</p>