Format value to complete with zeroes to the left
format_digit.Rd
Format value to complete with zeroes to the left until a certain size, e.g., considering a size of 2: 1 -> "01".
Arguments
- x
A numeric vector
- digits
A numeric integer single value (default = 2), that will be the number of length to add zeroes
Examples
x <- c(1,4,10,12)
format_digit(x)
#> [1] "01" "04" "10" "12"