Problem: I am trying to get all the obs from lyrics80s group them by year, and create a new data frame called 'decade' where it will store all the lyrics80s, and rest of them which is not included in the code chunk... (I have other chunks with lyrics90s lyrics00s ...etc) After putting them into decades I am trying to use different color for each decade and graph them using ggplot. Where it will show words per song vs decade.
I was thinking of pulling each data inserting them into a df called 'decade' and using that to plot 1980s 1990s and 2000s.
Below is my code for the r chunk:
lyrics80s%>%
group_by(year) %>%
mutate(decade) %>%
summarise(total=sum(count= n())) %>%
filter(grepl(".1980", decade)) %>%
arrange((desc(decade)))
#total80s <- rbind(lyrics80s)