I am trying to code this graph with should be pretty easy, but run into the error "Error: This function should not be called directly" I am pretty sure I have made some mistakes in the aes part...
My goal is to plot a graph for the most growing area (reason why I have filtered) per year. the y should be the number of patents granted, since there is no variable counting such, I would like to use the count of observations.
patents_most <- patents%>%
filter(area_30==9)
ggplot(patents_most, aes(x=appl_year, y=count(n())))+
geom_line()
I am a rookie so forgive me for eventual "stupid" mistakes.
Thank you in advance!!