Session Ready
Exercise

Inner join and cast dtm

You have the table t that you created in the previous exercise. It has columns word and document_number. You also have the table verbs with columns present and past containing present tense and past tense forms of verbs.

Like you did in the second chapter of the course, join both tables to keep only the past tense verbs, and then generate the word counts and create the document-term matrix.

Instructions
100 XP
  • Perform inner_join() using columns word and past as the keys.
  • Count word using document_number as a grouping variable.
  • Cast the table into a document-term matrix.