is_empty: Is object empty?

View source: R/others.R

is_emptyR Documentation

Is object empty?

Description

A function to test whether an object is empty. It checks the length of the object, so it has different behaviour than is.null.

Usage

is_empty(obj)

Arguments

obj

a general object

Value

a logical specifying if the object is NULL or not.

Examples

# TRUE
is_empty(NULL)
is_empty(c())

# FALSE
is_empty("")
is_empty(NA)
is_empty(NaN)


bblodfon/usefun documentation built on Sept. 17, 2023, 4:37 p.m.