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"