isEmpty {bbnet} | R Documentation |
Check if an Object is Empty
Description
This function determines whether the provided object is empty.
Usage
isEmpty(x)
Arguments
x |
The object to check for emptiness. |
Details
isEmpty()
checks if the given object, x
, has a length of 0,
indicating that it is empty. It can be used with various types of objects
in R, including vectors, lists, and data frames.
Value
A logical value: TRUE
if the object is empty, FALSE
otherwise.
Examples
# 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)
[Package bbnet version 1.0.1 Index]