Missing Value Where True/False Needed in Corrplot

Missing Value Where True/False Needed in Corrplot

I received this

Error in if (min(corr) < -1 - .Machine$double.eps || max(corr) > 1 + .Machine$double.eps) { : missing value where TRUE/FALSE needed

and I am not sure what it means. I have a missing value in my data and would like to remove that row of data. My previous code for getting a corrplot was

library(corrplot)
C <- cor(SIMPIN_Data)
corrplot(C, method="number", use="complete.obs")

Help? I am very new to R.

My data looks like this

 1-Response time 1-Accuracy 2-Response time 2-Accuracy 3-Response Time 3-Accuracy
1        500         .80             200          .60          100         .99
2        550          NA             250          .30          900         .50
3        550         .20             250          .30          900         .50
3

1 Answer

I just fixed this known corrplot issue "Enable to plot a matrix with NA". See

The problem was indeed in min(corr,na.rm=TRUE) and max(corr,na.rm=TRUE) as suggested by @nicola

You can download the latest version from github:

install.packages("devtools")
devtools::install_github("taiyun/corrplot")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sophia Al-Mansoor
Author

Sophia Al-Mansoor

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.