If this is homework - as per the Homework Policy - we can't just provide a load of copy-paste answers. I only provided the one I have as its basically just copy-pasted from the tidytext
documentation.
But with your new data frame you'll be able to answer the second part of the question, producing the graph. To do so, I'd recommend reading up on the dplyr::count()
function (write ?count
in your console) and reading more about how to plot using ggplot2
: