scales (version 0.1.0)

dollar_format: Currency formatter: round to nearest cent and display dollar sign.

Description

Currency formatter: round to nearest cent and display dollar sign.

Arguments

Value

  • a function with single paramater x, a numeric vector, that returns a character vector

Examples

Run this code
dollar_format()(c(100, 0.23, 1.456565, 2e3))
dollar_format()(c(1:10 * 10))
dollar(c(100, 0.23, 1.456565, 2e3))
dollar(c(1:10 * 10))

Run the code above in your browser using DataCamp Workspace