LoslegenKostenlos loslegen

Creating a word cloud

We've seen bar plots, now let's visualize word counts with word clouds! tidy_twitter has already been loaded, tokenized, and cleaned.

Diese Übung ist Teil des Kurses

Introduction to Text Analysis in R

Kurs anzeigen

Anleitung zur Übung

  • Load the wordcloud package.
  • Compute the word counts and assign to word_counts.
  • Assign the word column from word_counts to the words argument.
  • Assign the count column (n) from word_counts to the freq argument.

Interaktive Übung

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

# Load the wordcloud package
___(___)

# Compute word counts and assign to word_counts
word_counts <- ___ %>% 
  ___(___)

wordcloud(
  # Assign the word column to words
  ___ = ___, 
  # Assign the count column to freq
  ___ = ___,
  max.words = 30
)
Code bearbeiten und ausführen