trie | R Documentation |
create_trie
creates a trie (a key-value store optimised
for matching) out of a provided character vector of keys, and a numeric,
character, logical or integer vector of values (both the same length).
trie(keys, values)
keys |
a character vector containing the keys for the trie. |
values |
an atomic vector of any type, containing the values to pair with
|
a 'trie' object.
trie_add
and trie_remove
for adding to and removing
from tries after their creation, and longest_match
and other match functions
for matching values against the keys of a created trie.
# An integer trie int_trie <- trie(keys = "foo", values = 1) # A string trie str_trie <- trie(keys = "foo", values = "bar")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.