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

st: cut string


From   "Ha Thai Son" <[email protected]>
To   <[email protected]>
Subject   st: cut string
Date   Sun, 12 Dec 2004 17:02:21 +0700

Dear Statalists,

I want to generate a newvar icd_9 with only the firt 3 letters from oldvar
icd_10.

icd_10        icd_9
B51.0        B51
B51.8        B51
B52.0        B52
B52.8        B52
B52.9        B52
.....            .....
This can be done in EXCEL with LEFT command line e.g: left(B51.9, 3)=B51
But I don't know how to do it in Stata(8) Command

Any help will be appreciated

Many thanks in advance.

Dr. Ha Thai Son
NIMPE Hanoi, Vietnam

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