tweet_words: Most common words

Description Usage Arguments Value Examples

View source: R/rtweetclean.R

Description

Returns the top_n most common words and counts of occurrences from a list of tweets. The output is sorted descending by the count of words and in reverse alphabetical order for any word ties.

Usage

1
tweet_words(clean_dataframe, top_n = 1)

Arguments

clean_dataframe

dataframe

top_n

numeric

Value

dataframe

data.frame

Examples

1
2
3
4
5
6
7
8
#' @param clean_dataframe data.frame
input_data <- (data.frame(id = c(1,2,3,4,5),
text_only = c("this is example tweet 1",
             "this is example tweet 2 with a few extra words",
             "is third",
             "4th tweet",
             "fifth tweet")))
tweet_words(input_data, 3)

UBC-MDS/rtweetclean documentation built on April 28, 2021, 7:26 p.m.