I'd like to add the number count stat above each bar:
ggplot(data=diamonds, aes(x=color, fill=cut)) +
geom_bar(position="dodge") +
geom_text(aes(label=after_stat(count)), vjust=0)
It's giving me the error:
Error: Aesthetics must be valid computed stats. Problematic aesthetic(s): label = after_stat(count). Did you map your stat in the wrong layer?