ComenzarEmpieza gratis

Practicing reshaping data

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

Este ejercicio forma parte del curso

Introduction to Text Analysis in R

Ver curso

Instrucciones del ejercicio

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

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

tidy_twitter %>% 
  # Append the NRC sentiment dictionary
  ___(___) %>% 
  # Count by complaint label and sentiment
  ___(___) %>% 
  # Spread the sentiment and count columns
  ___(___, )
Editar y ejecutar código