Returns TRUE
if x
is either FALSE
, 0
, NULL
, NA
and
empty lists or an empty string. Inspired by python's
bool.
Examples
is.none(FALSE) # TRUE
#> [1] TRUE
is.none(0) # TRUE
#> [1] TRUE
is.none(1) # FALSE
#> [1] FALSE
is.none(NA) # TRUE
#> [1] TRUE
is.none(list()) # TRUE
#> [1] TRUE
is.none("") # TRUE
#> [1] TRUE
is.none(character()) # TRUE
#> [1] TRUE
is.none(numeric()) # TRUE
#> [1] TRUE
is.none(logical()) # TRUE
#> [1] TRUE