pretty_price: A function to write pretty prices in 'bookdown' reports

View source: R/pretty_price.R

pretty_priceR Documentation

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", ...)

Arguments

x

A number to be printed

digi

Number of digits

currency

The name of the currency

...

Extra arguments for formatC()

Value

A pretty price with the currency

Examples

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

tatooheene documentation built on April 3, 2025, 7:11 p.m.