| padInteger | R Documentation |
prefix integers with leading zeros
padInteger(x, padCharacter = "0", useNchar = NULL, ...)
x |
|
padCharacter |
|
useNchar |
|
... |
additional parameters are ignored. |
The purpose of this function is to pad integer numbers so they contain a consistent number of digits, which is helpful when sorting values as character strings.
character vector of length(x).
Other jam string functions:
asSize(),
breaksByVector(),
fillBlanks(),
formatInt(),
gsubOrdered(),
gsubs(),
makeNames(),
nameVector(),
nameVectorN(),
padString(),
pasteByRow(),
pasteByRowOrdered(),
sizeAsNum(),
tcount(),
ucfirst()
padInteger(c(1, 10, 20, 300, 5000))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.