# Check an empty vector
isEmpty(c())
# Check a non-empty vector
isEmpty(c(1, 2, 3))
# Check an empty list
isEmpty(list())
# Check a non-empty list
isEmpty(list(a = 1, b = 2))
# Check an empty data frame
isEmpty(data.frame())
# Check a non-empty data frame
isEmpty(mtcars)
Run the code above in your browser using DataLab