merge_terms {saotd} | R Documentation |
Merge Terms
Description
Function to merge terms within a data frame and prevent redundancy in the analysis. For example many users may refer to the same entity in multiple different ways: President Trump, The U.S. President, POTUS, Trump, President Donald Trump, Donald Trump, etc. While each entry is different, they all refer to the same individual. Using Merge Terms will allow all be converted into a single term.
Usage
merge_terms(DataFrame, term, term_replacement, ignore_case = TRUE)
Arguments
DataFrame |
Data Frame of Twitter Data. |
term |
Term selected for merging. |
term_replacement |
Desired replacement term. |
ignore_case |
True is the default setting and will ignore case sensitivity of the selected terms. Selecting FALSE will maintain case sensitivity. |
Value
A Tibble with user selected term replacement.
Examples
## Not run:
library(saotd)
data <- raw_tweets
data <- merge_terms(DataFrame = data,
term = "ice cream",
term_replacement = "ice_cream")
data
## End(Not run)
[Package saotd version 0.3.1 Index]