My code produces this graph:
Code:
ggplot(areas, aes(x = RETAILER, y = Difference), label=sprintf(\"%0.2f\", round(areas$Difference, digits
I use the percentfunction from formattable within geom_text.
So in your case I would do like so:
geom_text(aes(label = formattable::percent(Difference)),
vjust = ifelse(Difference >= 0, -1.5, 1.5))
you can define digits within percent, but the default is 2, which is what you're looking for. The % symbols remains, like you desire. Plus, you can do stuff with it as it is still numeric underneath and not character like other solutions out there.