char_tree: Create a new trie

Description Usage Arguments Value Examples

Description

Create a trie from a vector of words passed as an argument. Based on Florent Delmotte's response on http://stackoverflow.com/questions/27060453/how-to-build-an-alphabetical-tree-from-a-list-of-words-in-r.

Usage

1
char_tree(words, end = NULL)

Arguments

words

Vector of words.

end

Terminating character. Default is NULL.

Value

a trie (list of lists)

Examples

1
2
char_tree(c('able', 'act', 'acts', 'across',
            'act','bat','babble','bobble'), 'X')

ezgraphs/rtrie documentation built on May 16, 2019, 9:57 a.m.