# Extracting p-values using corrr package in R

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?

• If one of the solutions works for you, you can mark it as an accepted answer. Aug 18 at 14:26

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()

• got it. thank you so much Aug 15 at 20:46
• I have since used this solution in my own work and I confirm that it works well. Aug 18 at 14:27