powered by
Convert numeric to character with padding
paddedFloatToChar(x, padL = ceiling(log10(x + 1)), padR = 3, pad = "0")
numeric. Number to be converted to character with padding
numeric. Desired number of digits on left side of decimal. If not enough, pad will be used to pad.
pad
numeric. Desired number of digits on right side of decimal. If not enough, pad will be used to pad.
character to use as padding (nchar(pad)==1 must be TRUE). Passed to str_pad
nchar(pad)==1
TRUE
str_pad
Character string representing the filename.
# NOT RUN { paddedFloatToChar(1.25) paddedFloatToChar(1.25, padL = 3, padR = 5) # }
Run the code above in your browser using DataLab