Learn R Programming

cytominer (version 0.2.2)

variance_threshold: Remove variables with near-zero variance.

Description

variance_threshold returns list of variables that have near-zero variance.

Usage

variance_threshold(variables, sample)

Arguments

variables

character vector specifying observation variables.

sample

tbl containing sample used to estimate parameters.

Value

character vector specifying observation variables to be excluded.

Details

variance_threshold is a reimplementation of caret::nearZeroVar, using the default values for freqCut and uniqueCut.

Examples

Run this code
# NOT RUN {
sample <- tibble::tibble(
  AreaShape_Area = c(10, 12, 15, 16, 8, 8, 7, 7, 13, 18),
  AreaShape_Euler = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
)
variables <- c("AreaShape_Area", "AreaShape_Euler")
variance_threshold(variables, sample)
# }

Run the code above in your browser using DataLab