title: listing p-values with correlations
body: <p>I successfully got an ordered list of correlation values from a matrix based on <a href="https://stackoverflow.com/questions/31258940/keep-var-format-as-matrix-after-removing-values/31259564#31259564">this question</a>. I would like to include p-values like this:</p>
  
  <pre><code>  Var1 Var2  Freq  p-val
  6 col3 col2  0.60  0.06
  2 col2 col1 -0.38  0.28
  3 col3 col1 -0.72  0.01
  </code></pre>
  
  <p>I changed the code to use <code>corr.test</code> so I could get p-values, but im not sure how to put them in the list.</p>
  
  <pre><code>require(psych)
  set.seed(1)
  df &lt;- data.frame(
      col1 = rnorm(10),
      col2 = rnorm(10),
      col3=rnorm(10)
  )
  
  cors&lt;-corr.test(df)
  listCorr&lt;-as.data.frame.table(cors$r)[lower.tri(cors$r,diag=FALSE),]
  listCorr$Freq&lt;-signif(listCorr$Freq,2)
  listCorr&lt;-listCorr[with(listCorr,order(-listCorr[,3])),]
  </code></pre>