Closed akerah closed 3 years ago
It looks like you have an extra comma after "identity"
which might be causing the warning message. I would try removing it, and seeing if that helps.
Did not help. Am I approaching this correctly?
For Question 5, it asks for a bar chart of the shootings per month, so geom_bar()
is the function you want to use. Since geom_bar()
uses the "count" stat by default, you don't need to do your first step of grouping the months and counting them (as the counts for each month will automatically go on the y-axis). You'll want to adjust your inputs into ggplot()
accordingly (remember that geom_bar()
only needs an x-variable). You'll also need to think about how to order the months chronologically on your plot (this resource may help).
Thank you, I fixed my issue.
Hello,
I am getting this error message when I try to graph my months
month_month<-mass_shootings %>%group_by(month)%>% count()
ggplot(data=month_month, mapping = aes(x=month,y=n)) + geom_freqpoly(stat = "identity",)+ labs(title = "Number of mass shootings by Month", x = "Month", y= "Number of shootings" )