Rounding with the sprintf() function in the fmt argument.
Arguments
- fmt
A string to control sprintf(), such as "%.3f" to keep 3 decimal digits. See ?sprintf.
Value
A function that takes an object and returns a string with the object formatted using sprintf.