Assert a vector meets important data-quality requirements.
assert_non_na(x, class_vector, proportion_minimum)
assert_non_na_and_unique(x, class_vector)
Vector to inspect. Required.
The required base::class()
of the vector. If the
parameter is missing, the object's class is not checked.
The (inclusive) minimum proportion of the vector's elements that should meet the requirement. If missing, all elements must pass.
requireNamespace("OuhscMunge")
OuhscMunge::assert_non_na(1:30, "integer")
if (FALSE) { # \dontrun{
OuhscMunge::assert_non_na(c(1:30, NA_integer_), "integer")
} # }