format integer numbers with leading 0
Marc Girondot via R-help <r-help at r-project.org> writes:
I would like format integer number as characters with leading 0 for a fixed width, for example: 1 shoud be "01" 2 shoud be "02" 20 should be "20"
formatC(x, width=2, flag="0") -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20180104/4e503279/attachment.sig>