taiyun / corrplot

A visual exploratory tool on correlation matrix
https://github.com/taiyun/corrplot
Other
316 stars 86 forks source link

NA issues when cl.lim is supplied #142

Closed alexfun closed 3 years ago

alexfun commented 5 years ago

Minimal reproducible example:

M <- cor(mtcars)

diag(M) <- NA

corrplot::corrplot(M, method = 'shade', 
                   is.corr = T,
                   cl.lim = c(-1, 1))

produces:

Error in if (any(corr < cl.lim[1]) || any(corr > cl.lim[2])) { : 
  missing value where TRUE/FALSE needed

Possibly related to:

https://github.com/taiyun/corrplot/issues/70 https://github.com/taiyun/corrplot/issues/77