Skip to contents

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

Usage

zerovar(df)

Arguments

df

Dataframe

Value

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

Examples

df <- data.frame(a = c(1, NA, 3), b = rep(NA, 3), c = rep(5, 3))
print(df)
#>    a  b c
#> 1  1 NA 5
#> 2 NA NA 5
#> 3  3 NA 5
zerovar(df)
#> [1] "b" "c"