Learn R Programming

emil (version 2.2.3)

is_constant: Check if an object contains more than one unique value

Description

Check if an object contains more than one unique value

Usage

is_constant(x, na.rm = FALSE)

Arguments

Value

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.