I've created a simple correlation matrix in R and I'm trying to use caret for feature selection so I can remove the highly correlated X attributes.
Here is my code:
highlyCorrelated <- findCorrelation(correlationMatrix, cutoff = 0.90, verbose = FALSE, names = TRUE, exact = ncol(correlationMatrix) < 100)
- highlyCorrelated is the name for the new object
- correlationMatrix is the name of my correlation matrix
I'm getting the following error regardless of how I enter the function into R. Even if I only use one parameter I still get this error:
Error in if (x[i, j] > cutoff) { : missing value where TRUE/FALSE needed
Any thoughts?