dollarChar: dollarChar

Description Usage Arguments Value Examples

Description

dollarChar

Usage

1
2
dollarChar(x = "dollars", ndecimal = 2, unit = "d", currency = "$",
  direction = FALSE)

Arguments

x

Numeric. Dollar amount to be formatted.

ndecimal

Integer. Number of decimal places to round to

unit

What units to convert x to

  • d = dollars (ones)

  • k = thousands

  • m = millions

  • b = billions

  • t = trillions (this is a lot of money, are you sure you don't have a data issue?)

currency

String. Symbol to use as prefix of number.

direction

Boolean. Should + proceed the number for positive numbers?

Value

String.

Examples

1
dollarChar(x = 2118999, unit = 'm')

TonyBlonigan/miscFormatR documentation built on May 14, 2019, 6:08 a.m.