Description Usage Arguments Value Examples
This function standardizes things, depending on a dictionary. There are two dictionaries supplied (company_dictionary and address_dictionary), and the user may supply a new one (which is a two column dataframe with columns "word" and "standard").
1 | standardize(text, dictionary)
|
text |
A character vector of strings to convert using the dictionary |
dictionary |
A dictionary of word pairs (word, standard) to convert |
A vector of converted strings
1 2 3 4 5 6 7 8 9 10 11 12 | library(dplyr)
# company_dictionary is a dataset from this package; may need its own package? nah.
"A.-B. SECURITY LIMITED" %>% standardize(dictionary = company_dictionary)
# is vectorized:
c("A.-B. SECURITY LIMITED", "RNN Sales & R<c3><a9>ntals") %>% standardize(dictionary = company_dictionary))
## Not run:
br %>% mutate(standardized_name = standardize(name, dictionary = company_dictionary))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.