This is an extension question to: How to put labels over geom_bar for each bar in R with ggplot2
My data has some negatives and so the labels intrude into the bar. How can I adjust this? I need the label placements to be read dynamically.
Thanks!
growth<-data.frame(ElapsedTimeMonths=c(3,6,12,24),MedianGrowth=c(-0.011,-0.002,0.014,0.052))
g<-ggplot(growth, aes(x=factor(ElapsedTimeMonths),y=MedianGrowth))
g<-g+geom_bar(position="dodge", stat="identity")
g<-g+scale_y_continuous(labels = percent)
g<-g+geom_text(aes(label=as.character(100*MedianGrowth)), position=position_dodge(width=0.9), vjust=-0.25)
g