Dear All,

This question sounds very simple but I don't know where I am wrong. I just want to pad leading zeros in some string, for example, "123" becomes "00123". What is wrong if I do following?

> sprintf("%05s", "123")
[1] "  123"


It didn't return "00123", instead it padded with 'blank'.


Thank you for your help in advance.

HXD

	[[alternative HTML version deleted]]

