taiyun / corrplot

A visual exploratory tool on correlation matrix
https://github.com/taiyun/corrplot
Other
316 stars 86 forks source link

Include `cor.mtest` function into base corrplot #82

Closed vsimko closed 7 years ago

vsimko commented 7 years ago

I saw that the cor.mtest function is being used:

Maybe we should include it to corrplot as a function.

kassambara commented 7 years ago

Hi,

This would be great.

I think that the corrplot package is a place where we expect to have such functionality even if it's possible to compute the matrix of correlations and p-values using the Hmisc::rcorr() function.

One problem with Hmisc::rcorr() is that, it doesn't support kendall correlation method.

library(Hmisc)
res <- rcorr(as.matrix(mtcars[, 1:5]), type = "pearson")

res$r # the matrix of correlations
res$P # the matrix p-values