Description Usage Arguments Details
View source: R/suffix_formatter.R
This function allows you to add number suffixes, such as k for thousands, or M for millions to ggplots. It does NOT return anything when called by itself. Example scale_y_continuous(labels = suffix_formatter_0)
1 | suffix_formatter_0(x, digits = NULL)
|
x |
A vector of numbers representing an axis in your ggplot. |
digits |
Defaults to NULL. Here it set to zero for use in plots. |
Based on this stackoverflow post https://stackoverflow.com/questions/28159936/formatting-large-currency-or-dollar-values-to-millions-billions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.