variance_threshold: Remove variables with near-zero variance.

Description Usage Arguments Details Value Examples

View source: R/variance_threshold.R

Description

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

Usage

1

Arguments

variables

character vector specifying observation variables.

sample

tbl containing sample used to estimate parameters.

Details

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

Value

character vector specifying observation variables to be excluded.

Examples

1
2
3
4
5
6
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)

Example output

Attaching package:cytominerThe following object is masked frompackage:stats:

    aggregate

The following object is masked frompackage:base:

    transform

[1] "AreaShape_Euler"

cytominer documentation built on July 8, 2020, 5:08 p.m.