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

Description Usage Arguments Value Author(s) See Also Examples

View source: R/is.empty.R

Description

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

Usage

1

Arguments

x

hash object.

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

Value

logical.

Author(s)

Christopher Brown

See Also

hash() exists() length()

Examples

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

decisionpatterns/r-hash documentation built on Feb. 6, 2019, 10:27 p.m.