is.empty: Check for empty values

Description Usage Arguments Value Examples

Description

Check if the object has an empty value, does not include checking empty strings.

Usage

1
is.empty(object)

Arguments

object

The object that are to be checked.

Value

A logical value that states whether the object is considered empty.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Test that turns out TRUE
a <- NULL
b <- character()
is.empty(a)
is.empty(b)
is.empty(list())  # is TRUE as length = 0
is.empty(c())

# Test that turns out FALSE
is.empty("")
is.empy(NA)

KasperThystrup/circulaR documentation built on March 14, 2021, 12:44 p.m.