scale_big_dollar: Scale large dollar amounts to shortened dollar amounts (k, M,...

View source: R/scales.R

scale_big_dollarR Documentation

Scale large dollar amounts to shortened dollar amounts (k, M, B, T)

Description

[Stable] Format a vector of numeric values according to monetary abbreviations.

(ie: 1,000 becomes "1 k", 2,500,000 becomes "2.5 B") See: https://www.wallstreetoasis.com/forums/abbreviation-for-thousands-millions-billions-trillion

Usage

scale_big_dollar(x, sep = " ", suffix_n = F)

Arguments

sep

Seperator to use between number and unit (defaults to " ").

suffix_n

Use "Bn" and "Tn" instead of "B" and "T".

Value

Character vector of formatted dollar values.

Examples

## Not run: 
scale_big_dollar(1000)
scale_big_dollar(1000000000)
scale_big_dollar(1000000000, suffix_n = T)

## End(Not run)

IntegralEnvision/integral documentation built on Nov. 4, 2024, 2 p.m.