is.empty {utilitiesR} | R Documentation |
See if an argument is na, null, or length 0 (syntactic sugar).
is.empty(x)
x |
object to check |
boolean, TRUE if it is na, null OR length 0.
syntactic sugar for is.null(x) || is.na(x) ||
length(x)==0
. Note that the empty string ("") is NOT
"empty" in this sense.
is.empty(NA) # true is.empty(NULL) # true is.empty(character()) # true, length 0 is.empty("") # false, this has length 1.