I have made a ggplot bar chart showing counts on the y-axis and categorical values on the x-axis.
p <- ggplot(data=vanco, aes(x=factor(verdi_mengde)))+geom_bar()
[![enter image description here][1]][1]
I want to display the counts on the bars, and have been attempting to add the counts with geom_text:
p+geom_text(aes(label=..count..))
However, to my frustration is get an error message:
Error in FUN(X[[i]], ...) : object 'count' not found
What am I doing wrong???