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

Re: st: destring with embedded blanks


From   smerryman@kc.rr.com
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: destring with embedded blanks
Date   Thu, 03 Mar 2005 08:44:50 -0600

You could also use -destring-

destring ID, ignore(" ") gen(new_id)

Hope this helps,
Scott


----- Original Message -----
From: Neil Shephard <mdeasnds@fs1.ser.man.ac.uk>
Date: Thursday, March 3, 2005 7:30 am
Subject: Re: st: destring with embedded blanks

> > 
> > Perhaps something like the following....
> > 
> > gen new_id = real(subinstr(ID, " ","", . )
> > 
> 
> Typo error noticed (after reading David's post) above should be 
> 
> gen new_id = real(subinstr(ID, " ", "", .))
> 
> Sorry for the error,
> 
> Neil
> 


*
*   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