Skip to contents

Check if Object is Empty

Usage

is_empty(x)

# S3 method for class 'Container'
is_empty(x)

# S3 method for class 'dict.table'
is_empty(x)

Arguments

x

any R object.

Value

TRUE if object is empty otherwise FALSE.

Examples


co = container(1, 2)
is_empty(co)
#> [1] FALSE
is_empty(clear(co))
#> [1] TRUE

d = dict.table(a = 1:4, b = 4:1)
is_empty(d)
#> [1] FALSE
is_empty(clear(d))
#> [1] TRUE