sprintf works like a charm.
I feel rather embarrassed right now. I see that when I do ?format, at the
very end of the documentation, sprintf is suggested as further reading.
muito obrigado
culpritNr1
Henrique Dallazuanna wrote:
>
> Try this:
>
> formatC(12, width = 5, flag = "0")
> or
> s
Try this:
formatC(12, width = 5, flag = "0")
or
sprintf("%05d", 12)
On Tue, Oct 21, 2008 at 3:24 PM, culpritNr1 <[EMAIL PROTECTED]> wrote:
>
> Hello List,
>
> Can anybody point me to a number-to-string formatting function?
>
> I need to convert, say, 12 to 00012.
>
> I tried format() but its too
Hello List,
Can anybody point me to a number-to-string formatting function?
I need to convert, say, 12 to 00012.
I tried format() but its too stubborn: it seems to only pad with spaces.
Thank you,
Your culpritNr1
--
View this message in context:
http://www.nabble.com/Paddding-an-integer-w
3 matches
Mail list logo