BenWade
September 13, 2022, 11:05am
1
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 REPR oducible EX ample (reprex) illustrating your issue.
BenWade
September 13, 2022, 12:17pm
4
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.
First and foremost, please ask!
A core goal of community is to be a friendly place to chat about topics related to data science, R, and RStudio.
We know that posting to technical forums can be intimidating. But know that many here would love to see you overcome your inhibition and engage with us.
Here are a few tips some folks here think might be helpful.
Before you post
Check Out R Documentation - R has built in documentation on packages and functions .
For example typing ?lm into your R console will open the documentation on the lm function .
Search - Be sure to search for the basic keywords of your question with your favorite search engine, Stack Overflow, and R-Help. Stack Overflo…
system
Closed
October 4, 2022, 12:24pm
6
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.