powered by
Check if vector is constant
is_constant(x, skip_missing = FALSE)
Logical.
Vector: Input
Logical: If TRUE, skip NA values before test
EDG
x <- rep(9, 1000000) is_constant(x) x[10] <- NA is_constant(x) is_constant(x, skip_missing = TRUE)
Run the code above in your browser using DataLab