Learn R Programming

tatooheene (version 0.19.0)

pretty_price: A function to write pretty prices in bookdown reports

Description

[Experimental] This function writes pretty prices in bookdown reports. The function uses the formatC() function to format the number and adds the currency to the end of the number.

Usage

pretty_price(x, digi = 2, currency = "EUR", ...)

Value

A pretty price with the currency

Arguments

x

A number to be printed

digi

Number of digits

currency

The name of the currency

...

Extra arguments for formatC()

Examples

Run this code
# Example usage of the pretty_price function
pretty_price(1000, currency = "EUR")

Run the code above in your browser using DataLab