Rounds a numeric value to a specified number of decimal places and formats it to always show the specified number of decimal places, including trailing zeros.
custom_round(x, digits = 1)A character vector with the rounded and formatted numbers.
custom_round(3.14159) # "3.1"
#> [1] "3.1"
custom_round(3.14159, 3) # "3.142"
#> [1] "3.142"
custom_round(c(2, 2.5), 2) # "2.00" "2.50"
#> [1] "2.00" "2.50"