pad | R Documentation |
Places zeros to the left of a string. If the string
consists only of digits 0-9, pad()
does not change the value of
the string if interpreted as a numeric.
pad(x,len,padchar="0",strict=TRUE)
x |
Input argument (converted to character) |
len |
Desired length of output |
padchar |
Character to pad x with, defaulting to “0” |
strict |
Boolean variable governing the behaviour when length of
|
Robin K. S. Hankin
pad("1234",len=10)
pad("1234",len=3,strict=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.