Corrplot for spearman correlation

Hi Guys, I'm fairly new to R and want to create a corrplot with the spearman correlations and not the Pearson. How would one go about this?

A code would be highly appreciated.

Thanks

library(corrplot) 

M <- cor(mtcars)
corrplot(M)

M2 <- cor(mtcars,method="spearman")
corrplot(M2)
1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.