Package: r2r 0.1.1

Valerio Gherardi

r2r: R-Object to R-Object Hash Maps

Implementation of hash tables (hash sets and hash maps) in R, featuring arbitrary R objects as keys, arbitrary hash and key-comparison functions, and customizable behaviour upon queries of missing keys.

Authors:Valerio Gherardi [aut, cre]

r2r_0.1.1.tar.gz
r2r_0.1.1.zip(r-4.5)r2r_0.1.1.zip(r-4.4)r2r_0.1.1.zip(r-4.3)
r2r_0.1.1.tgz(r-4.4-any)r2r_0.1.1.tgz(r-4.3-any)
r2r_0.1.1.tar.gz(r-4.5-noble)r2r_0.1.1.tar.gz(r-4.4-noble)
r2r_0.1.1.tgz(r-4.4-emscripten)r2r_0.1.1.tgz(r-4.3-emscripten)
r2r.pdf |r2r.html
r2r/json (API)

# Install r2r in R:
install.packages('r2r', repos = c('https://vgherard.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/vgherard/r2r/issues

On CRAN:

data-structureshashtable

16 exports 3 stars 3.86 score 2 dependencies 28 dependents

Last updated 3 years agofrom:d9679b09071a7d71bb06924850d6566c8582e99b (via v0.1.1)

Exports:%has_key%compare_fndefaultdefault_hash_fndefault<-deletehas_keyhash_fnhashmaphashsetinsertkeyson_missing_keyon_missing_key<-queryvalues

Dependencies:digestrlang

Comparison

Rendered frombenchmarks.Rmdusingknitr::rmarkdownon May 20 2024.

Last update: 2021-07-02
Started: 2021-07-02

r2r

Rendered fromr2r.Rmdusingknitr::rmarkdownon May 20 2024.

Last update: 2021-07-02
Started: 2021-07-01

Readme and manuals

Help Manual

Help pageTopics
Get key comparison function of an hash tablecompare_fn compare_fn.r2r_hashtable
Default 'hashmap' valuesdefault default.r2r_hashmap default<- default<-.r2r_hashmap
String hashes for arbitrary R objectsdefault_hash_fn
Delete keys or key/value pairs from an hash table.delete delete.r2r_hashmap delete.r2r_hashset
Key existence in hash tables%has_key% has_key has_key.r2r_hashmap has_key.r2r_hashset
Get hash function of an hash tablehash_fn hash_fn.r2r_hashtable
Hash maps and setshashmap hashset hashtable
Methods for S3 classes 'hashmap' and 'hashset'hashtable_methods
Insert keys or key/value pairs into an hash table.insert insert.r2r_hashmap insert.r2r_hashset
List all keys from an hash tablekeys keys.r2r_hashtable
Size of hash tableslength.r2r_hashtable
On missing key behaviouron_missing_key on_missing_key.r2r_hashmap on_missing_key<- on_missing_key<-.r2r_hashmap
Query keys from an hash table.query query.r2r_hashmap query.r2r_hashset
Subsetting 'hashset's and 'hashmap'ssubsetting_hashtables [.r2r_hashmap [.r2r_hashset [<-.r2r_hashmap [<-.r2r_hashset [[.r2r_hashmap [[.r2r_hashset [[<-.r2r_hashmap [[<-.r2r_hashset
List all values from an hash mapvalues values.r2r_hashmap