Check to see whether the input is either NA or a vector of length 0.

is.missing(x)

Arguments

x

object to check.

Value

TRUE if the input is a vector of length 0; is.na(x) otherwise.

See also

Examples

is.missing(numeric(0))
#> [1] TRUE
is.missing(NA)
#> [1] TRUE
is.missing(c(1,2,3,NA,5))
#> [1] FALSE FALSE FALSE  TRUE FALSE