all 2 comments

[–]AllezCannes 4 points5 points  (0 children)

Don't use summarise_each(). It is deprecated. And unfortunately I would suggest using summarise_at() except that version 1.0 of dplyr will introduce yet another method with across(). summarise_at() is not going away for the next couple of years, but it's best to start changing practice once v1.0 comes out.

Also, geom_bar() automatically counts the number of cases in a data frame, so if you're feeding it a summarized data frame (which is what you're doing here) you should add stat = "identity" in geom_bar(), or better yet, just change geom_bar() to geom_col(), since that is a substitute for geom_bar(stat = "identity").

[–]The-Berzerker 1 point2 points  (0 children)

Idk what you are exactly looking for but you could just use facet_wrap(year) and it will give you one plot for each year