library(dplyr)
# what are the top five most played songs?
setlists %>%
count(song, sort = TRUE) %>%
slice(1:5)
# what is the average show length?
setlists %>%
count(gig_key) %>%
summarise(ave_length = mean(n))
Run the code above in your browser using DataLab