# NOT RUN {
emptyIsFalse(NULL)
emptyIsFalse(NA)
emptyIsFalse("")
try(`if(NULL) "not empty" else "empty"`) # will generate error
if(emptyIsFalse(NULL)) "not empty" else "empty" # this will work
# similar for `NA`, `""`, `character(0)` and more
# }
Run the code above in your browser using DataLab