Typically to display axis values in different scales in ggplot2 we can use the following:
p + scale_y_continuous(labels = scales::unit_format(unit = "M", scale = 1e-6))
How can the same be done for geom_text labels? With commas we would do the following
p + geom_text(aes(y = y_val, x = x_val, label = scales::comma(value)))
Is there a function analogous to comma for millions (ex: 100M)?