is.empty {hash}R 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

[Package hash version 2.2.6.3 Index]