For example, this code
data <- data.frame(month = factor(c("Nov", "Dec", "Jan", "Feb")),
count = c(1489, 788, 823, 1002))
g <- (ggplot2::ggplot(data, ggplot2::aes(x=month, y=count))
+ ggplot2::geom_bar(stat="identity")
+ ggplot2::scale_x_discrete(limits=rev(data$month))
+ ggplot2::coord_flip())
g
...produces this
What is the simplest way to add the counts (1489, 788, etc.) to the right of the corresponding bar?
I am particularly interested in the horizontal case, but I would also love to know how to do the analogous thing for the vertical case (counts on top of each bar):
g <- (ggplot2::ggplot(data, ggplot2::aes(x=month, y=count))
+ ggplot2::geom_bar(stat="identity"))
g



