LoslegenKostenlos loslegen

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?

Diese Übung ist Teil des Kurses

Introduction to Text Analysis in R

Kurs anzeigen

Anleitung zur Übung

  • Load the tidyverse package, which includes dplyr and ggplot2.
  • Filter the data to only keep tweets that are complaints.
  • Count the number of verified and non-verified users that have complained.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Load the tidyverse package
___(___)

twitter_data %>% 
  # Filter for just the complaints
  ___(___) %>% 
  # Count the number of verified and non-verified users
  ___(___)
Code bearbeiten und ausführen