Exercise

Evaluating a DTM as a matrix

Let's practice casting our tidy data into a DTM and evaluating the DTM by treating it as a matrix.

In this exercise, you will create a DTM again, but with a much smaller subset of the twitter data (tidy_twitter_subset).

Instructions

100 XP
  • Cast the word counts by tweet into a DTM and assign it to dtm_twitter.
  • Coerce dtm_twitter into a matrix called matrix_twitter.
  • Print rows 1 through 5 and columns 90 through 95.