format_digit | R Documentation |
Format value to complete with zeroes to the left until a certain size, e.g., considering a size of 2: 1 -> "01".
format_digit(x, digits = 2)
x |
A numeric vector |
digits |
A numeric integer single value (default = 2), that will be the number of length to add zeroes |
A character vector with zeroes added to the left to achieve the desired size.
x <- c(1,4,10,12)
format_digit(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.