Error in Corrplot: the matrix is not in [-1, 1]!

Hello everybody,

I have a question. Currently, I am writing my thesis for my masters degree. However, I have a problem with my R-script. I want to draw a correlation matrix with "corrplot" for 61 variables. Below shows the code I run:

CORCOF <- rcorr(as.matrix(Data2), type = "pearson")
write.xlsx(CORCOF$r,"r-matrix.xlsx")
write.xlsx(CORCOF$P,"p-matrix.xlsx")
corrplot(CORCOF$r,method = "circle", type = "full", diag = FALSE, insig = "blank", tl.cex = 1/par("cex"),
cl.cex = 1/par("cex"), addCoefasPercent = TRUE)
corrplot(CORCOF$P,method = "circle", type = "full", diag = FALSE, insig = "blank", tl.cex = 1/par("cex"),
cl.cex = 1/par("cex"), addCoefasPercent = TRUE)

R-matrix gives the error: Error in corrplot(CORCOF$r, method = "circle", type = "full", diag = FALSE, :
The matrix is not in [-1, 1]!
However, when I run exactly the same code for less variables, a correlation matrix will appear.

Is someone able to help me and solve this error?

Thank you in advance.

Kind regards, Cato

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.