powered by
Appends leading zeroes to a vector of numbers based on a string length or a maximum number.
add_leading_zeroes(number, number_length, max_number)
A numeric vector.
The length of the output string.
A number to base the length of the output string on.
A character vector.
# NOT RUN { x=c(1:10) add_leading_zeroes(x,number_length=4) add_leading_zeroes(x,max_number=10000) # }
Run the code above in your browser using DataLab