has-key: Test for existence of key(s) on a hash

Description Usage Arguments Details Value Author(s) See Also Examples

Description

has.key returns a logical vector as long as keys, indicating which keys are defined on the hash.

Usage

1
  has.key(key, hash, ...)

Arguments

key

A vector whose entries will be coerced to valid keys.

hash

A hash object.

...

arguments passed to further functions

Details

None.

Value

logical

A logical vector of length key indicating whether the key is defined in the hash. has.key also accepts ... to be passed to underlying sapply

Author(s)

Christopher Brown

See Also

See also hash

Examples

1
2
3
4
                            

    h <- hash( letters, 1:26 )
    all( has.key( letters, h ) ) # TRUE

hash documentation built on May 29, 2017, 12:08 p.m.