powered by
Format numbers
format_num(x, digits = 1, pzero = TRUE)
A character string formatting the number with specified number of digits after the decimal.
Number.
Number of digits after the decimal.
Logical value (default = TRUE) for whether to include leading zero numbers less than 1.
format_num(pi, digits = 2) format_num(pi, digits = 4)
Run the code above in your browser using DataLab