Marc Girondot via R-help <r-help@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")
signature.asc
Description: PGP signature
______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.