R/format_numbers.R
format_num.Rd
All functions in this package are deprecated. Please use the {cocoon} package instead.
{cocoon}
format_num(x, digits = 1, pzero = TRUE)
Number
Number of digits after the decimal
Logical indicator of whether to include leading zero numbers less than 1
A character string formatting the number with specified number of digits after the decimal.
format_num(pi, digits = 2) #> [1] "3.14" format_num(pi, digits = 4) #> [1] "3.1416"