Closed UNFPAmaldives closed 2 years ago
I'm using R 4.1.2 in RStudio with corrplot 0.92. When I run the following:
general_df = data.frame(matrix(rnorm(20), nrow=10)) library(corrplot) M <- cor (general_df) corrplot(M, type = 'upper') general_log <- cor (log (general_df)) corrplot (general_log, order = "hclust", addrect = 5, method = 'ellipse', title = 'FPC: Log-Transform')
This returns the error:
Error in hclust(as.dist(1 - corr), method = hclust.method) : NA/NaN/Inf in foreign function call (arg 10)
There are obviously no NA/NaN/Inf rows or columns in my data set. How do I fix this problem?
> general_log X1 X2 X1 1 NA X2 NA 1
I'm using R 4.1.2 in RStudio with corrplot 0.92. When I run the following:
This returns the error:
There are obviously no NA/NaN/Inf rows or columns in my data set. How do I fix this problem?