count categories+facet_wrap

hi everyone
could you please help me to find my mistake.
bike_type <- bike_rides[, c(1,2,13,16)]

EDIT
correct code


bike_type %>% group_by(month, rideable_type, member_casual) %>% 
  summarise(n = n()) %>% 
ggplot()+geom_col(mapping = aes(
  x=month, y=n, fill = member_casual
))+facet_wrap(~rideable_type)

that's what I want to get

The only evident problem I can see is that your x and y aesthetics are inverted, the plot you are showing has month in the y axis and n in the x axis but you are not providing enough information for us to know if that is the only problem.

If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.

I edited the code. it is correct now.

I don't understand what you mean, it is exactly the same code. Please read this forum guidelines about how to properly ask coding related questions.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.