Skip to contents

dollarize(x) inputs a numeric values and returns that number in U.S. dollar format rounded to the nearest integer.

Usage

dollarize(x)

Arguments

x

Numeric value

Value

x printed in a character string in U.S. dollar format.

Examples

dollarize(10)
#> [1] "$10"
dollarize(321.53)
#> [1] "$322"
dollarize(12000)
#> [1] "$12,000"