addWord: Adds a single word or string

Description Usage Arguments Details Value See Also Examples

View source: R/addWord.R

Description

Adds a single word to an existing ternary search tree

Usage

1
addWord(tree, string)

Arguments

tree

an existing ternary search tree to add words to.

string

a string of characters to be added to the tree.

Details

The string of characters is added to the existing tree.

Value

An object of class 'list' and 'tstTree'.

See Also

newTree

Examples

1
2
3
fruitTree <- newTree(c("apple", "orange"))
fruitTree <- addWord(fruitTree, "lemon")
dimTree(fruitTree)

TSTr documentation built on May 1, 2019, 9:16 p.m.