Check if an object contains more than one unique value
is_constant(x, na.rm = FALSE)
Vector or matrix.
Whether to ignore missing values.
Logical scalar that is TRUE
if x
contains more than one
unique value and FALSE
if not.
A logical scalar that is TRUE
if x
contains more than
one unique value and FALSE
otherwise. In case x
contains
missing values NA
is returned if na_rm = FALSE
. If there are
no non-missing values NA
is always returned.