Skip to contents

[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

if (FALSE) {
scale_big_dollar(1000)
scale_big_dollar(1000000000)
scale_big_dollar(1000000000, suffix_n = T)
}