I have this data frame (train) where I have 2314 variables and I want to drop the columns where the unique length of the column is < 2 and keep the columns where the length is > 1. Maybe I can apply to scale to my function and then run it!
Example:
length(unique(train$makeAcura))
[1] 2
And delete columns with length < 2
length(unique(train$makeAm.General))
[1] 1