query | R Documentation |
These generics are used for querying a single key from an
hashset
or hashmap
, respectively. For vectorized queries,
see the subsetting_hashtables documentation page.
query(x, key)
## S3 method for class 'r2r_hashmap'
query(x, key)
## S3 method for class 'r2r_hashset'
query(x, key)
x |
an |
key |
an arbitrary R object. Key to be queried from the hash table. |
TRUE
or FALSE
, for hashset
s. For
hashmap
s, if the queried key exists in the hash table, returns the
associated value (an a priori arbitrary R object); otherwise, behaves as
specified by on_missing_key(x)
(see also hashtable).
Valerio Gherardi
s <- hashset(1, 2, 3)
query(s, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.