not_na

0th

Percentile

Returns TRUE if value is not NA

This is the inverse of is.na. This is a convenience function meant to be used as a predicate in an assertr assertion.

Usage
not_na(x, allow.NaN = FALSE)
Arguments
x

A R object that supports is.na an is.nan

allow.NaN

A logical indicating whether NaNs should be allowed (default FALSE)

Value

A vector of the same length that is TRUE when the element is not NA and FALSE otherwise

See Also

is.na is.nan

Aliases
  • not_na
Examples
# NOT RUN {
not_na(NA)
not_na(2.8)
not_na("tree")
not_na(c(1, 2, NA, 4))

# }
Documentation reproduced from package assertr, version 2.7, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.