hash {hash}R Documentation

hash/associative array/dictionary data structure for the R language

Description

Preferred constructor for the hash-class.

Usage

hash(keys,values)

Arguments

keys Optional vector of keys
values Optional argument of values

Details

hash returns a hash object. The first argument is taken as the vector of keys and must be coercable to a character vector. The second argument will be taken as the corresponding values. See .set for how vectors of unequal length are interpretted which does most of the work of this function.

Value

An object of class hash.

Author(s)

Christopher Brown

See Also

.set, hash-accessors

Examples

    h <- hash()
    h <- hash( letters, 1:26 )


[Package hash version 0.23 Index]