average
Young 0.01921875
Cohoused Young 0.07111951
Old 0.06057224
Cohoused Old 0.12102273
I am using the above data frame to create a histogram or bar and my code is as follows:
C <-ggplot(data=c,aes(x=average))
C + geom_bar()
but the plot is attached here.
I would like the bar heights to reflect my data on the y axis instead of where the bar is placed on the x axis, but I don't know what my problem is in the code.
geom_col()instead.geom_bar()set the height of the bar to the count of the items.