From a data frame get the columns with more than one distinct value.

count_unique(df, col_names = NULL)

Arguments

df

A data frame.

col_names

A vector of column names to inspect.

Value

A named logical vector where TRUE means there is more than one distinct value in the column.