powered by
Round a number, preserving extra 0's.
myround(x, digits = 1)
Number to round.
Number of digits past the decimal point to keep.
A vector of character strings.
Uses sprintf to round a number, keeping extra 0's.
sprintf
round, sprintf
round
# NOT RUN { myround(51.01, 3) myround(0.199, 2) # }
Run the code above in your browser using DataLab