How to use corrplot with simple matrices

I have a simple 8 by 8 matrix

M <- matrix(rnorm(64), nrow=8, ncol=8) 

How do I convert it to build it using library(corrplot)? No conversion error

corrplot.mixed(M)

# Error in corrplot(corr, type = "upper", method = upper, diag = TRUE, tl.pos = tl.pos,  : 
  The matrix is not in [-1, 1]!

which, I think, would suggest that the matrix should be [-1, 1]?

+4
source share
1 answer

Just indicate that this is not a correlation matrix:

library(corrplot)
corrplot(M, is.corr = FALSE, method = "square")

enter image description here

+6
source

All Articles