Learn R Programming

hash (version 3.0.1)

hash-package: hash package

Description

Hash/associative array/dictionary data structure for the R language.

Arguments

docType

package

Details

This S4 class is designed to provide a hash-like data structure in a native R style and provides the general methods for hash/dictionary operations.

References

Some discussion can be found here:

See Also

hash, Extract and environment

Examples

Run this code
h <- hash( keys=letters, values=1:26 )
  h <- hash( letters, 1:26 )

  h$a # 1

  h$foo <- "bar"
  h[ "foo" ]
  h[[ "foo" ]]

  clear(h)
  rm(h)

Run the code above in your browser using DataLab