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

RE: st: String problem.


From   "Nick Cox" <[email protected]>
To   <[email protected]>
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 
[email protected] 

Ulrich Kohler
 
> Maybe something along the line of:
> 
> . gen hhid2 = hv001*100 + hv002
> . tostring hhid2, replace
> . replace hhid2 = subinstr(hhid2,"0"," ",.)
 
> [email protected] 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index