round0 {tidyfst} | R Documentation |
Round a number and make it show zeros
Description
Rounds values in its first argument to the specified number of decimal places, returning character, ensuring first decimal digits are showed even when they are zeros.
Usage
round0(x, digits = 0)
Arguments
x |
A numeric vector. |
digits |
Integer indicating the number of decimal places. Defaults to 0. |
Value
A character vector.
References
https://stackoverflow.com/questions/42105336/how-to-round-a-number-and-make-it-show-zeros
See Also
Examples
a = 14.0034
round0(a,2)
b = 10
round0(b,1)
[Package tidyfst version 1.8.1 Index]