7

I have a simple 8 by 8 matrix

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

How should I transform it to plot it with library(corrplot)? Without transformation the error is:

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 guess would assume that the matrix should be [-1, 1]?

Karolis Koncevičius
  • 7,687
  • 9
  • 48
  • 71
CptNemo
  • 5,805
  • 14
  • 46
  • 95

1 Answers1

13

Just indicate that it is not a correlation matrix:

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

enter image description here

agstudy
  • 113,354
  • 16
  • 180
  • 244