insert | R Documentation |
These generics are used for inserting a single key or key/value
pair into an hashset
or hashmap
, respectively. For vectorized
insertions, see the subsetting_hashtables documentation page.
insert(x, key, ...)
## S3 method for class 'r2r_hashmap'
insert(x, key, value, ...)
## S3 method for class 'r2r_hashset'
insert(x, key, ...)
x |
an |
key |
an arbitrary R object. Key to be inserted into the hash table. |
... |
further arguments passed to or from other methods. |
value |
an arbitrary R object. Value associated to |
key
for the hashset
method,
value
for the hashmap
method.
Valerio Gherardi
s <- hashset()
insert(s, "foo")
s[["foo"]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.