Similar to janitor::remove_constant, except this function aims to identify the constant columns without removing them. If there are no constant columns, it will return NA.
See also
Other quality checks:
cols_all_unique(),
cols_bijective(),
cols_identify_all(),
cols_missing(),
cols_nested()
Examples
df <- data.frame(x1 = 1, x2 = c("A", "B", "C"), x3 = "a")
cols_constant(df)
#> [1] "x1" "x3"