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