powered by
Help function to format numeric data with formatC function.
formatC
h_fmt_num(x, digits, width = digits + 4)
A character object with specific digits and width.
(numeric) numeric input.
numeric
(integer) the desired number of digits after the decimal point (format = "f").
integer
(integer) the total field width.
formatC()
h_fmt_num(pi * 10^(-2:2), digits = 2, width = 6)
Run the code above in your browser using DataLab