nearZeroVar(x, freqCut = 95/5, uniqueCut = 10, saveMetrics = FALSE)saveMetrics = FALSE, a vector of integers corresponding to the column positions of the problematic predictors. If saveMetrics = TRUE, a data frame with columns:To be flagged, first the frequency of the most prevalent value over the
second most frequent value (called the ``frequency ratio'') must be
above freqCut. Secondly, the ``percent of unique values,'' the
number of unique values divided by the total number of samples (times
100), must also be below uniqueCut.
In the above example, the frequency ratio is 999 and the unique value percentage is 0.0001.
nearZeroVar(iris[, -5], saveMetrics = TRUE)
data(BloodBrain)
nearZeroVar(bbbDescr)Run the code above in your browser using DataLab