Description Usage Arguments Details Value Examples
Manipulate the content of text that will be analyzed. Merge like terms into a single term, replace names found in text, and remove content deemed irrelevant.
1 | mergeTerms(data.td, term, term.replacement)
|
data.td |
A tidy dataset |
term |
A user identified term |
term.replacement |
A user specified term to replace the original term found in the text |
Supplied a search term and a replacement term, this function seeks to identify each instance of the search term within the corpus and replace it with the replacement term. Should the user elect to delete a term, instead of replacing it, the replacement term should be identified as "" within the function. **Warning: Once a term is deleted from the corpus it can not be replaced. To return the term to the analysis, the corpus must be rebuilt to its previous state.
Permanently alters the corpus by replacing all instances of term
with term.replacement
1 2 3 | Articles <- mergeTerms(Articles,"Affordable Care Act","ACA")
Articles <- mergeTerms(Articles,"White House", "White_House")
Articles <- mergeTerms(Articles, "Fox News", "")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.