mod_nullable | R Documentation |
This modifies a predicate function to ignore NAs.
mod_nullable(pred)
pred |
A predicate function |
A new predicate that allows NAs
# The `is_incrementing` predicate will fail if there are NAs
x <- c(1, NA, 3)
is_incrementing(x) # FALSE
is_incrementing_null <- mod_nullable(is_incrementing)
is_incrementing_null(x) # TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.