IniziaInizia gratis

Practicing reshaping data

The pivot_wider() verb allows us to quickly reshape or stack and transpose our data, making it easier to mutate().

Questo esercizio fa parte del corso

Introduction to Text Analysis in R

Visualizza il corso

Istruzioni dell'esercizio

  • Append tidy_twitter to the NRC sentiment dictionary.
  • Count by complaint label and sentiment.
  • Widen the sentiment and count columns.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

tidy_twitter %>% 
  # Append the NRC sentiment dictionary
  ___(___) %>% 
  # Count by complaint label and sentiment
  ___(___) %>% 
  # Spread the sentiment and count columns
  ___(___, )
Modifica ed esegui il codice