Skip to contents

Check if vector is constant

Usage

is_constant(x, skip_missing = FALSE)

Arguments

x

Vector: Input

skip_missing

Logical: If TRUE, skip NA values before test

Author

EDG

Examples

if (FALSE) { # \dontrun{
x <- rep(9, 1000000)
is_constant(x)
x[10] <- NA
is_constant(x)
is_constant(x, skip_missing = TRUE)
} # }