Description Usage Arguments Value Examples
add zeros to number as string for composing file names
1 | leadingzeros(num, ndigits, ext = NULL)
|
num |
numeric or character, the number |
ndigits |
numeric, the total number of digits for the output |
ext |
character, optional, a file extension to be added |
character
1 2 3 4 5 6 7 8 9 10 | leadingzeros(3, 2)
leadingzeros(3, 5)
leadingzeros(333, 3)
leadingzeros(333, 6)
leadingzeros(333, 6, ".wav")
# produces an error
# leadingzeros(333, 2)
# similar to
sprintf("%06.0f", 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.