Re: [R] add zero in front of numbers

From: Luis Ridao <luridao_at_gmail.com>
Date: Mon, 04 Apr 2011 11:43:19 +0100

Have a look at

?formatC

On Mon, Apr 4, 2011 at 11:35 AM, Yan Jiao <y.jiao_at_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_at_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_at_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. Received on Mon 04 Apr 2011 - 10:45:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 04 Apr 2011 - 11:20:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive