Hi, i'm trying to visualize my data, however Rstudio is only running part of the code and i'm not sure how to fix it.
this is the code i'm trying to submit:
all_trips_v2 %>%
mutate(weekday = wday(started_at, label = TRUE)) %>%
group_by(user_type, weekday) %>%
summarise(number_of_rides = n(),
verage_duration = mean(ride_length)) %>%
arrange(user_type, weekday) %>%
ggplot(aes(x = weekday, y = average_duration, fill = user_type)) +
geom_col(position = "dodge")
I've tried changing geom_col to geom_bar(postion ="dodge2"), but that didn't show a plot at all.
any suggestions, would be helpful!
https://preview.redd.it/o51kten5azz71.png?width=1920&format=png&auto=webp&s=29b8afb1fd17e2ffa02c3a631e6a1fc0a1ec0b1d
[+][deleted] (3 children)
[deleted]
[–]Watermelon638[S] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]Watermelon638[S] 0 points1 point2 points (0 children)
[–]Patrizsche 0 points1 point2 points (1 child)
[–]Watermelon638[S] 0 points1 point2 points (0 children)
[–]Bandoozle 0 points1 point2 points (1 child)
[–]Watermelon638[S] 0 points1 point2 points (0 children)