Learn R Programming

hash (version 3.0.1)

is.empty: 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

Value

logical.

See Also

hash exists length

Examples

Run this code
h <- hash( a=1, b=2, c=3 )

    is.empty(h)    # FALSE
    clear(h)
    is.empty(h)    # TRUE
    h <- hash()
    is.empty(h)    # TRUE

Run the code above in your browser using DataLab