Re: [R] Leading zeros

2011-08-19 Thread Jeff Newmiller
>> >> - Menssagem Original - >> De: >> "David Winsemius" >> >> Para: >> "David Winsemius" >> Cópia: >> "Vasco Cadavez" , >> Enviado: >> Fri, 19 Aug 2011 11:51:08 -0400 >> Assu

Re: [R] Leading zeros

2011-08-19 Thread jim holtman
"234/12" "21342342134/34" "99" On Fri, Aug 19, 2011 at 12:41 PM, Ole Peter Smith wrote: > -- Forwarded message -- > From: Ole Peter Smith > Date: Fri, Aug 19, 2011 at 1:40 PM > Subject: Re: [R] Leading zeros > To:

Re: [R] Leading zeros

2011-08-19 Thread R. Michael Weylandt
arded message -- > From: Ole Peter Smith > Date: Fri, Aug 19, 2011 at 1:40 PM > Subject: Re: [R] Leading zeros > To: David Winsemius > > > I'm all new to R, assisting the last days of topics from the sideline. > I am, however, a longterm programmer. > > This questi

Re: [R] Leading zeros

2011-08-19 Thread Ole Peter Smith
-- Forwarded message -- From: Ole Peter Smith Date: Fri, Aug 19, 2011 at 1:40 PM Subject: Re: [R] Leading zeros To: David Winsemius I'm all new to R, assisting the last days of topics from the sideline. I am, however, a longterm programmer. This question makes me ask m

Re: [R] Leading zeros

2011-08-19 Thread Peter Langfelder
On Fri, Aug 19, 2011 at 9:19 AM, David Winsemius wrote: > > Copying list one what was sent in reply. Anybody have a better solution? > No sure my solution is better, but it avoids the integer conversion and retains the "/". I wrote a function that padds entries of input character vector with zero

Re: [R] Leading zeros

2011-08-19 Thread David Winsemius
Para: "David Winsemius" Cópia: "Vasco Cadavez" , Enviado: Fri, 19 Aug 2011 11:51:08 -0400 Assunto: Re: [R] Leading zeros On Aug 19, 2011, at 11:17 AM, David Winsemius wrote: > > On Aug 19, 2011, at 11:12 AM, Vasco Cadavez wrote: > >> Hello, >>

Re: [R] Leading zeros

2011-08-19 Thread David Winsemius
On Aug 19, 2011, at 11:17 AM, David Winsemius wrote: On Aug 19, 2011, at 11:12 AM, Vasco Cadavez wrote: Hello, I have a dataset with an Id columns like: 4/3003 55/333 66/22 I want to put leading zeros to get: 0004/3003 00055/333 66/22 How can I solve this? ?sprintf ?format

Re: [R] Leading zeros

2011-08-19 Thread David Winsemius
On Aug 19, 2011, at 11:12 AM, Vasco Cadavez wrote: Hello, I have a dataset with an Id columns like: 4/3003 55/333 66/22 I want to put leading zeros to get: 0004/3003 00055/333 66/22 How can I solve this? ?sprintf ?formatC -- David Winsemius, MD West Hartford, CT __

[R] Leading zeros

2011-08-19 Thread Vasco Cadavez
Hello, I have a dataset with an Id columns like: 4/3003 55/333 66/22 I want to put leading zeros to get: 0004/3003 00055/333 66/22 How can I solve this? Thanks Vasco Cadavez [[alternative HTML version deleted]] __ R-help@r-