powered by
paddedFloatToChar(x, padL = ceiling(log10(x + 1)), padR = 3, pad = "0")
pad
nchar(pad)==1
TRUE
str_pad
paddedFloatToChar(1.25) paddedFloatToChar(1.25, padL = 3, padR = 5)
Run the code above in your browser using DataLab