Test whether a vector is length zero and IS not NULL

is_empty(x)

Arguments

x

Value

logical. TRUE if x is empty but it is not NULL

Examples

x <- vector()
is_empty(x)
#> [1] TRUE

y <- NULL
length(y)
#> [1] 0
is_empty(y)
#> [1] FALSE