Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: destring, keeping leading zeros

From   "Svend Juul" <[email protected]>
To   <[email protected]>
Subject   Re: st: destring, keeping leading zeros
Date   Tue, 5 Jul 2005 16:35:59 +0200


You have a string variable which has the following distinct codes:


You want to make the variable numeric, but keep the leading zero
on the first code to keep them distinct.

You are asking for the impossible, I think: The numeric value of 123 and 0123 is the same. If you want to keep them distinct, why not keeping them as stings?



Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6 
DK-8000 Aarhus C,  Denmark 
Phone, work:  +45 8942 6090 
Phone, home:  +45 8693 7796 
Fax:          +45 8613 1580 
E-mail:       [email protected] 

*   For searches and help try:

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