Learn R Programming

assertive (version 0.2-6)

assert_all_are_not_na: Is the input present/missing?

Description

Checks to see if the input is (not) NA.

Usage

assert_all_are_not_na(x)

assert_any_are_not_na(x)

is_na(x)

is_not_na(x)

Arguments

x
Input to check.

Value

  • is_na wraps is.na, showing the names of the inputs in the answer. is_not_na is the negation. The assert_* functions return nothing but throw an error if the corresponding is_* function returns FALSE.

See Also

is.na

Examples

Run this code
x <- c(0, NaN, NA)
is_na(x)
is_not_na(x)
assert_all_are_not_na(1:10)
assert_any_are_not_na(x)
dont_stop(assert_all_are_not_na(x))

Run the code above in your browser using DataLab