Adding custom stop words
We've seen a number of words in twitter_data
that aren't informative and should be removed from your final list of words. In this exercise, you will add a few words to your custom_stop_words
data frame .
This is a part of the course
“Introduction to Text Analysis in R”
Exercise instructions
- The column names for the new data frame of custom stop words should match
stop_words
. - Add
http
,win
, andt.co
as custom stop words. - Row bind the custom stop words to
stop_words
.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
custom_stop_words <- tribble(
# Column names should match stop_words
___, ___,
# Add http, win, and t.co as custom stop words
___, "CUSTOM",
___, "CUSTOM",
___, "CUSTOM"
)
# Bind the custom stop words to stop_words
stop_words2 <- stop_words %>%
___(___)