File: alter.Rd

package info (click to toggle)
r-cran-triebeard 0.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 392 kB
  • sloc: cpp: 1,095; sh: 13; makefile: 2; ansic: 1
file content (42 lines) | stat: -rw-r--r-- 973 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/alter.R
\name{alter}
\alias{alter}
\alias{trie_add}
\alias{trie_remove}
\title{Add or remove trie entries}
\usage{
trie_add(trie, keys, values)

trie_remove(trie, keys)
}
\arguments{
\item{trie}{a trie object created with \code{\link{trie}}}

\item{keys}{a character vector containing the keys of the entries to
add (or remove). Entries with NA keys will not be added.}

\item{values}{an atomic vector, matching the type of the trie, containing
the values of the entries to add. Entries with NA values will not be added.}
}
\value{
nothing; the trie is modified in-place
}
\description{
\code{trie_add} and \code{trie_remove} allow you to
add or remove entries from tries, respectively.
}
\examples{
trie <- trie("foo", "bar")
length(trie)

trie_add(trie, "baz", "qux")
length(trie)

trie_remove(trie, "baz")
length(trie)

}
\seealso{
\code{\link{trie}} for creating tries in the first place.
}