
Last chance! 50% off unlimited learning
Sale ends in
clean_tweets(tweets, min = 0, stopwords = NULL, exclude_words = NULL)
min = 0
, all words (except
those excluded by stopwords and exclude_words) are returned.
To only return words mentioned at least 3 times, for example,
set (min = 3
).stopwords = NULL
, uses a generic list of stopwords.## Not run:
# # search for 1000 tweets mentioning Hillary Clinton
# hrc <- search_tweets(q = "hillaryclinton", count = 1000)
#
# # lookup returned user_id values
# users <- lookup_users(hrc$user_id)
# users
#
# # merge data objects
# dat <- dplyr::left_join(hrc, users, by = "user_id")
# dat
#
# # clean tweet text for each user
# dat$words <- clean_tweets(dat, exclude_words = "hillaryclinton")
# dat$words
# ## End(Not run)
Run the code above in your browser using DataLab