Description Usage Arguments Value Examples
Replaces the individual elements of the vector 'terms' by the reassign key (largely based on qdapTools::lookup)
1 2 | top_term_lookup(terms, key.match, key.reassign = NULL,
tokenize = FALSE)
|
terms |
A vector of terms to undergo a lookup |
key.match |
Takes one of the following: |
key.reassign |
A single reassignment vector supplied if key.match is not a two column data.frame/named list |
tokenize |
If TRUE terms will be first split by word boundaries and than put back together |
A new vector with reassigned values
1 2 3 4 5 6 | library(tpfuns)
a <- c("property and plant", "property", "plant")
b <- c("property", "plant")
c <- c("replace 1", "replace 2")
top_term_lookup(a, b, c)
top_term_lookup(a, b, c, TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.