powered by
Decimal formatting
h_format_dec(digits, format, ne = NULL)
function formatting numbers with the defined format.
function
(integer) number of digits.
integer
(string) describing how the numbers should be formatted following the sprintf syntax.
string
sprintf
(string) that should replace actual value. If NULL, no replacement is performed.
NULL
fun <- h_format_dec(c(1, 1), "%s - %s") fun(c(123, 567.89))
Run the code above in your browser using DataLab