I'm performing correlation analysis using the corrr package in R, but I'm unable to extract the p values. Does anyone know how to get the p values in corrr package in R?

  • $\begingroup$ If one of the solutions works for you, you can mark it as an accepted answer. $\endgroup$
    – Tripartio
    Aug 18, 2021 at 14:26

2 Answers 2


I would suggest looking at some of the documentation.

As far as I can tell, the intention of the package is to visualize and organize correlation coefficient estimates. It does not seem that the author of the package has any interest in p-value estimation.

If you are interested in computing p-values, I would suggest using a different tool, such as the builtin cor.test() function.


Here is a suggested workaround:

  • Generate a p-value table using one of these tools:
    • RcmdrMisc::rcorr.adjust()
    • psych::corr.test()

Then use corrr:as_cordf() to generate the tidy dataframe with the same structure as a regular corrr correlation table.

Personally, I have used the Hmisc::rcorr() package, and it works well:

Hmisc::rcorr() %>% `[[`('P') %>% corrr::as_cordf()
  • $\begingroup$ got it. thank you so much $\endgroup$
    – rahul
    Aug 15, 2021 at 20:46
  • $\begingroup$ I have since used this solution in my own work and I confirm that it works well. $\endgroup$
    – Tripartio
    Aug 18, 2021 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.