generic: Generic functions

genericR Documentation

Generic functions

Description

Generic functions

Details

There are the following generic functions:

  • hash_exists(h, keys): tests whether keys exist.

  • hash_keys(h): returns a vector of keys.

  • hash_values(h, keys = NULL): returns a vector of values.

  • hash_size(h): returns the size of the hash table or hash set.

  • hash_insert(h, keys, ...): inserts new keys or modify values for existing keys.

  • hash_delete(h, keys): deletes keys.

  • hash_copy(h): makes a copy of the hash table or hash set.

They can be used on the hash object created by hash_table(), hash_set(), hash_fm_table(), hash_fm_set(), hash_env_table(), hash_env_set().

Value

hash_exists() returns a logical vector. hash_keys() returns a character vector. hash_values() returns a single vector or a list. hash_size() returns an integer scalar. hash_insert(), hash_delete() and hash_copy() all return a hash table object.


hashtable documentation built on July 27, 2026, 5:09 p.m.