Have a look at ?formatC
On Mon, Apr 4, 2011 at 11:35 AM, Yan Jiao <y.j...@ucl.ac.uk> wrote: > Dear R users, > > I need to add 0 in front of a series of numbers, e.g. 1->001, 19->019, > Is there a fast way of doing that? > > Many thanks > > yan > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > 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. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list 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.