Counting user types
Counts are the essential summary for categorical data. Since text is categorical, it's important to get comfortable computing counts. The twitter_data is composed of complaints and non-complaints, as indicated by the complaint_label column, and also includes a column indicating whether or not the user is verified (i.e., they have been confirmed by Twitter to be who they say they are) called usr_verified. Note that column is of type <lgl>, meaning logical. Do verified users complain more?
This exercise is part of the course
Introduction to Text Analysis in R
Exercise instructions
- Load the 
tidyversepackage, which includesdplyrandggplot2. - Filter the data to only keep tweets that are complaints.
 - Count the number of verified and non-verified users that have complained.
 
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Load the tidyverse package
___(___)
twitter_data %>% 
  # Filter for just the complaints
  ___(___) %>% 
  # Count the number of verified and non-verified users
  ___(___)