Learn R Programming

lares (version 5.2.13)

zerovar: Zero Variance Columns

Description

This function detects which columns have the same value (whichever) for each column.

Usage

zerovar(df)

Value

Character vector with column names on which its values have no variance.

Arguments

df

Dataframe

See Also

Other Data Wrangling: balance_data(), categ_reducer(), cleanText(), date_cuts(), date_feats(), file_name(), formatHTML(), holidays(), impute(), left(), normalize(), num_abbr(), ohe_commas(), ohse(), quants(), removenacols(), replaceall(), replacefactor(), textFeats(), textTokenizer(), vector2text(), year_month()

Examples

Run this code
df <- data.frame(a = c(1, NA, 3), b = rep(NA, 3), c = rep(5, 3))
print(df)
zerovar(df)

Run the code above in your browser using DataLab