I'm trying to get a graph like this to show boxplot distributions for each age group:
But instead my plot looks like this:
How can I get the boxplots to show rather than the points? Why is my Y axis non numeric?
And here's the plot code I am trying:
p2 <- ggplot(data = popSample, aes(x = AGEGRP, y = TOT_POP)) +
geom_boxplot(aes(group = AGEGRP)) +
scale_x_discrete() +
theme_light()
p2
Thank you for helping someone who is learning,