<p>I would suggest looking at some of the <a href="https://cran.r-project.org/web/packages/corrr/index.html" rel="noreferrer">documentation</a>.</p>
<p>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.</p>
<p>If you are interested in computing p-values, I would suggest using a different tool, such as the builtin <code>cor.test()</code> function.</p>

CC BY-SA 4.0
2020-11-13T23:33:55.393Z
2020-11-13T23:33:55.393Z
Maximilian Press
<p>Here is a <a href="https://github.com/tidymodels/corrr/issues/29" rel="nofollow noreferrer">suggested workaround</a>:</p>
<ul>
<li>Generate a p-value table using one of these tools:
<ul>
<li><code>RcmdrMisc::rcorr.adjust()</code></li>
<li><code>psych::corr.test()</code></li>
</ul>
</li>
</ul>
<p>Then use <code>corrr:as_cordf()</code> to generate the tidy dataframe with the same structure as a regular corrr correlation table.</p>
<p>Personally, I have used the <code>Hmisc::rcorr()</code> package, and it works well:</p>
<pre><code>Hmisc::rcorr() %&gt;% `[[`('P') %&gt;% corrr::as_cordf()
</code></pre>

CC BY-SA 4.0
2021-08-15T20:46:45.297Z
got it. thank you so much
rahul
CC BY-SA 4.0
2021-08-18T14:27:14.823Z
I have since used this solution in my own work and I confirm that it works well.
Tripartio
CC BY-SA 4.0
2021-07-27T09:53:17.830Z
2021-08-18T14:26:11.633Z
2021-08-18T14:26:11.633Z
Tripartio
<p>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?</p>

CC BY-SA 4.0
2021-08-18T14:26:40.050Z
If one of the solutions works for you, you can mark it as an accepted answer.
Tripartio
<r><correlation><p-values>
Extracting p-values using corrr package in R
# Extracting p-values using corrr package in R

(Asked by: username_0 on 2020-11-13)

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?

**Tags:** r, correlation, p-values
> **Comments:**
> **username_1**: If one of the solutions works for you, you can mark it as an accepted answer.  

---

## 2 answers

### Answer by username_2 on 2020-11-13. Score: 5

I would suggest looking at some of the [documentation](https://cran.r-project.org/web/packages/corrr/index.html).

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.


---

### Answer by username_1 on 2021-07-27. Score: 1

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

> **Comments:**
> **username_0**: got it. thank you so much  
> **username_1**: I have since used this solution in my own work and I confirm that it works well.  

---

