is_constant: Check if vector is constant

View source: R/rt_ops.R

is_constantR Documentation

Check if vector is constant

Description

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 testing

Author(s)

E.D. Gennatas

Examples

## Not run: 
x <- rep(9, 1000000)
is_constant(x)
x[10] <- NA
is_constant(x)
is_constant(x, skip_missing = TRUE)

## End(Not run)

egenn/rtemis documentation built on Oct. 28, 2024, 6:30 a.m.