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

RE: st: String problem.


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: String problem.
Date   Wed, 7 Sep 2005 16:23:09 +0100

This will not work for the problem stated, 
as the digit "0" can occur as part of 
an identifier. 

Nick 
n.j.cox@durham.ac.uk 

Ulrich Kohler
 
> Maybe something along the line of:
> 
> . gen hhid2 = hv001*100 + hv002
> . tostring hhid2, replace
> . replace hhid2 = subinstr(hhid2,"0"," ",.)
 
> adiallo5@worldbank.org wrote:

> > I have problem generating a hid variable.
> > I want to reproduce an exact clone of my
> > hhid. It is 12 characters long.

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