leading0: Numeric to Character with Leading Zero(s)
Description
Transform numeric values to character string prepending leading zero(s).
Usage
leading0(num, digits = 2)
Arguments
num
Numeric vector (character also possible) to transform.
digits
Numeric value of minimum length of output strings.
Value
Character vector with same length of strings of each value.
Original "string" is prepended by zero(s).
String length is at least max(nchar(as.character(num))).