is.empty: Test if a hash has no key-value pairs.

View source: R/class-hash.R

is.emptyR Documentation

Test if a hash has no key-value pairs.

Description

is.empty tests to see if any key value pairs are assigned on a hash object.

Usage

  is.empty(x)

Arguments

x

hash object.

Details

Returns TRUE if no key-value pairs are defined for the hash, FALSE otherwise.

Value

logical.

Author(s)

Christopher Brown.

See Also

exists.

Examples

    h <- hash( a=1, b=2, c=3 )
    is.empty(h)    # FALSE
    clear(h)
    is.empty(h)    # TRUE
    h <- hash()
    is.empty(h)    # TRUE

hash documentation built on Aug. 20, 2023, 1:08 a.m.