Session Ready
Exercise

Plot the better word cloud

Now that you've removed additional stopwords let's take a look at the improved word cloud!

The term-document matrix from the previous exercise has been turned into matrix with as.matrix(), then a named vector was created with rowSums(). This new object of term frequencies called chardonnay_words is preloaded into your workspace. Let's take a look at these new word cloud results.

Instructions
100 XP

We've loaded the wordcloud package for you behind the scenes and will do so for all additional exercises requiring it.

  • Sort the values in chardonnay_words with decreasing = TRUE. Save as sorted_chardonnay_words.
  • Look at the top 6 words in sorted_chardonnay_words and their values.
  • Create terms_vec using names() on chardonnay_words.
  • Pass terms_vec and chardonnay_words into the wordcloud() function. Review what other words pop out now that "chardonnay" is removed.