powered by
pad an integer (prefix with zeroes to a fixed length)
padded(x, maxx=0)
vector of non-negative integers
a single integer to whose nchar all x elements will be padded; if 0 (default) the largest value in x will be used
a character vector representing the values of x left-padded with 0's to the length of integer maxx or of max(x)
# NOT RUN { padded(c(21, 1, 121, NA, 0)) padded(c(21, 1, 121, NA, 0), maxx=1000) # }
Run the code above in your browser using DataLab