Aan de slagGa gratis aan de slag

Counting sentiment

The tidy_twitter dataset has been loaded for you. Let's see what sort of sentiments are most prevalent in our Twitter data.

Deze oefening maakt deel uit van de cursus

Introduction to Text Analysis in R

Cursus bekijken

Oefeninstructies

  • Join tidy_twitter and the NRC sentiment dictionary.
  • Count the sentiments in sentiment_twitter.
  • Arrange the sentiment counts in descending order.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Join tidy_twitter and the NRC sentiment dictionary
sentiment_twitter <- ___ %>% 
  ___(___("nrc"))

# Count the sentiments in sentiment_twitter
___ %>% 
  ___(___) %>% 
  # Arrange the sentiment counts in descending order
  ___(___)
Code bewerken en uitvoeren