ezr.drop_constant: Drop Constants

Description Usage Arguments Value Examples

Description

Drop constant columns in a dataframe. Optional parameter to return 2nd dataframe of counts.

Usage

1
2
ezr.drop_constant(dataset, return_n_distinct_tbl = FALSE,
  exclude_cols = NULL, include_NAs = TRUE)

Arguments

dataset

Dataframe

return_n_distinct_tbl

return a 2nd dataframe just showing counts of n_distincts in each column

exclude_cols

Exclude this column...use if want to keep a constant

remove_NAs

if TRUE, NAs are not counted. If FALSE, NAs are counted as a unique value

Value

Returns the corrected dataframe or corrected_dataframe + a n_distinct table

Examples

1
2
mtcars$constant = 'constant_value'
ezr.drop_constant(mtcars, return_n_distinct_tbl = FALSE)

jmp1989/easyr documentation built on May 20, 2019, 7:25 a.m.