x <- "test"
is_empty(x)
x <- ""
is_empty(x)
x <- NA
is_empty(x)
x <- NULL
is_empty(x)
# string is not empty
is_empty("")
# however, this trimmed string is
is_empty(trim(""))
# numeric vector
x <- 1
is_empty(x)
x <- x[-1]
is_empty(x)
Run the code above in your browser using DataLab