leading_zero | R Documentation |
Add or remove leading zeros
leading_zero(x, z = NULL, mode = "add")
x |
Numeric or character vector |
z |
Number of significant digits of the resulting number with leading zeros (if NULL, it will be detected automatically) |
mode |
"add" or "remove" leading zero |
vector with (mode = "add) or without (mode = "remove") leading zeros
leading_zero(1:10, z=3)
leading_zero(c(1,10,100,1000,10000))
leading_zero(c("001", "1001", "g01", "0abc"), mode = "remove")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.