Skip to contents

Count the propotion of different sentiment tweets in a labelled sentiment dataframe

Usage

count_tweets(df, proportion = TRUE)

Arguments

df

A dataframe after pre-processing

proportion

A boolean value if True: returns the proportion; otherwise, return the counts

Value

A list which calculates the proportion of three sentiments of tweets

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)