title: How to add frequency count labels to the bars in a bar graph using ggplot2?
body: <p>I want to plot frequency distribution of an [r] factor variable as a bargraph, where bars represent the frequency counts of the factor levels. I use ggplot2 to do that and there's no problem with that.</p>
  
  <p>What I can't figure out is how to add frequency count labels to the bars in the bargraph. The syntax that I've tried is as follows:</p>
  
  <pre><code>ggplot(data, aes(x = factorvar)) + geom_bar(fill = "somecolor") + geom_text(aes(y = ???))
  </code></pre>
  
  <p>I think I thoroughly searched in stackoverflow and "R Graphics Cookbook" by W.Chang but I couldn't find any specific answer to what parameter should I match to "y" in the aesthetics of geom_text() above. I tried some variants like: (y = ..count..) but it didn't work.</p>
  
  <p>I would appreciate any help. Thanks...</p>