powered by
Rounds a numeric value and formats it as a string, keeping trailing zeroes.
round2(x, digits = 2)
Numeric value to round
Digits for rounding
# NOT RUN { round2(0.03000, digits = 4) # compare to base round, which drops trailing zeroes and returns a numeric round(0.03000, digits = 4) # }
Run the code above in your browser using DataLab