Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: numeric to string - transform from 1 to 01?


From   David Kantor <[email protected]>
To   [email protected]
Subject   Re: st: numeric to string - transform from 1 to 01?
Date   Thu, 06 Sep 2007 09:52:37 -0400

Just a minor correction to my last reply. I should have written,
tostring ind, gen(indstr) format(%02.0f

-- had I read the original question thoroughly.

At 09:30 AM 9/6/2007, Franco wrote:
I have a numeric variable, "ind" which goes from 1 to
20.

I want to convert it into a string variable "indstr",
that goes from 01 (as opposed to 0) to 20.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index