I made the graph below using ggplot:
ggplot(subset(monthly.rate, year=="2015"), aes(x=a6ncopo)) + geom_bar()
Here the number of observations at each time point (and therefore the number of rows) are being summed for each time point.
I want to make the same graph but using geom_line to make a line graph. But of course I get the error 'requires the following missing aesthetics: y'.
How do I get ggplot2 to plot a line graph using the number of rows on the y axis, the same way it easily handles using geom_bar?
Dput:
(removed)
stat="count"
to yourgeom_line
. – scoa