Count the propotion of different sentiment tweets in a labelled sentiment dataframe
Source:R/sentiment_analysis.R
count_tweets.Rd
Count the propotion of different sentiment tweets in a labelled sentiment dataframe
Arguments
- df
A dataframe after pre-processing
- proportion
A boolean value if True: returns the proportion; otherwise, return the counts
Examples
df <- data.frame(User = c("Youri"), text = c("Hi, how are you!"))
labelled_df <- sentiment_labeler(df, "text")
#> Warning: `spread_()` was deprecated in tidyr 1.2.0.
#> ℹ Please use `spread()` instead.
#> ℹ The deprecated feature was likely used in the syuzhet package.
#> Please report the issue to the authors.
count_list <- count_tweets(labelled_df)