Description Usage Arguments Value Examples
Converts numbers into character strings formatted as currency values, with reasonable abbreviations and significant digits. Is vectorized and can be used with ggplot's axis scaling functions - see examples.
1 | scale_y_continuous(labels = money_label)
|
money_values |
A numeric or integer value or vector of values, to convert to currency abbreviations |
cur |
A character or string to prepend to the labels. Likely a currency sign - "$" by default. Use "" for no prepended string. |
a character vector of formatted labels
1 2 3 4 5 6 7 8 9 10 | ggplot(
data = FPDS %>%
group_by(Fiscal.Year, Vendor.Size) %>%
summarize(Action.Obligation = sum(Action.Obligation)),
aes(
x = Fiscal.Year,
y = Action.Obligation,
color = Vendor.Size)) +
geom_line() +
scale_y_continuous(labels = money_label)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.