Wrapper functions for printing nicely formatted values.
Usage
print_currency(
x,
suffix = "",
big.mark = ",",
accuracy = NULL,
prefix = NULL,
...
)
print_percent(x, accuracy = 0.1, ...)
Arguments
- x
A numeric vector
- big.mark
Character used between every 3 digits to separate thousands.
- accuracy
A number to round to. Use (e.g.)
0.01
to show 2 decimal places of precision. IfNULL
, the default, uses a heuristic that should ensure breaks have the minimum number of digits needed to show the difference between adjacent values.Applied to rescaled data.
- prefix, suffix
Symbols to display before and after value.
- ...
Other arguments passed on to
base::format()
.