my_round.Rd
Converts numeric values to character strings with fixed decimal formatting using sprintf()
.
my_round(x, digit = 0)
A numeric vector to format.
Number of decimal places to display, 0 by default.
A character vector of formatted values.
my_round(3.1415, 2)
#> [1] "3.14"
my_round(3, 2)
#> [1] "3.00"