library(dplyr)
# What are the most common albums?
songs %>%
filter(!is.na(album)) %>%
count(album, sort = TRUE)
# What word occurs most frequently in the lyrics from the album 'Born To Run'
library(tidytext)
songs %>%
filter(album == 'Born To Run') %>%
select(title, lyrics) %>%
unnest_tokens(word, lyrics) %>%
count(word, sort = TRUE) %>%
anti_join(stop_words, by = 'word')
Run the code above in your browser using DataLab