Description Usage Arguments Author(s) Examples
convert integer to string with fixed width by leading zeros (or spaces)
1 | asCharacterWithLeading(x, template = "00")
|
x |
integer vector: number to convert to string |
template |
scalar string of intended output length with specifying the leading characters. |
Thomas Wutzler
1 2 3 | x <- c(1,11,111)
asCharacterWithLeading(x,"000")
try( asCharacterWithLeading(x) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.