I am using R version 3.5.1.
I started with this problem, and used the code suggested by the top comment on my own dataset, where time_len
is a categorical variable telling how long it takes to play game i, with values of short, medium, and long; num_fans
is a numeric variable telling how many fans game i has:
ggplot(cdata) +
aes(x = time_len, y = num_fans) +
geom_bar(stat = "identity")
Here is the plot:
I created the bar chart using the code above, but the problem is that the num_fans
variable looks like it is a total. I want it to show the average for each category.
Is there a way to show the average of num_fans
?