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

Re: st: New variable


From   cthompson@econometricainc.com
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: New variable
Date   Thu, 16 Jun 2005 13:59:45 -0400

perhaps the following??

destring oldID, gen(newID)  ignore(". -" ) 

hope this helps,
clint


On 16 Jun 2005 at 16:01, Fernando Augusto Proietti wrote:

> Dear all,
> 
> I have a huge data set. The ID variable is like that:
> 
> 05.81-0120
> 25.63-0208
> 
> and so on.
> 
> I want to create a ne ID1 variable, without the "." and the "-", and
> keeping the 0 before the first number:
> 
> 05810120
> 25630208
> 
> 
> Thanks in advance.
> 
> Fernando
> 




Clinton J. Thompson
Econometrica, Inc.
4416 East-West Highway, Suite 215
Bethesda, MD  20814
Phone: 240-333-4803
Fax: 301-657-3140
www.EconometricaInc.com

The information transmitted is intended only for the person 
or entity to which it is addressed and may contain confidential 
and/or privileged material. Any review, re-transmission, 
dissemination or other use of, or taking of any action 
in reliance upon, this information by persons or entities 
other than the intended recipient is prohibited. If you
received this in error, please contact the sender and 
delete the material from any computer.
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index