zero_var: Figure out the variables having zero variance

Description Usage Arguments Value Examples

Description

zero_var identifies the variables in the data frame with zero variance and returns their index values. The code has been by Gavin Simpson and taken from stackoverflow.

Usage

1

Arguments

The

input to the function is a data frame.

Value

Returns a vector of column names in the data frame which have zero variance along with their index.

Examples

1
2
zero_var_index <- zero_var(df)
df_without_zerovariance <- df[,-zero_var_index]

yogids/dcntrl documentation built on May 10, 2019, 10:25 a.m.