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

st: RE: RE: string question


From   "Rodrigo Briceno" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: string question
Date   Mon, 25 Oct 2004 17:03:37 -0600

Thanks a lot!

_____________________________
Rodrigo Brice�o
Consultant
Sanigest International
Telf. (506) 291-1200
Fax. (506) 232-0830
Cell (506) 357-4535
www.sanigest.com
_____________________________

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Wallace, John
Sent: Monday, October 25, 2004 4:39 PM
To: [email protected]
Subject: st: RE: string question

You're looking for the -subinstr- function:
.gen newvar = subinstr(oldvar,".","",.)

The syntax shows that in each instance of oldvar, the "." character is to be
replaced with an empty string, ""
You can find this in the online stata help by typing
. whelp strfun

...which will show you all the functions for manipulating strings.

Best regards,

John Wallace | Research Associate | Test Method Development
AFFYMETRIX, INC. | 3380 Central Expressway | Santa Clara, CA 95051 | Tel:
408-731-5574 | Fax:  408-481-0435 


-----Original Message-----
On Behalf Of Rodrigo Briceno

Dear Statalisters.

I have a variable that is coded with a car�cter that I don't want to have
(The original variable is A03.1 for example and I want A031).
Is there a procedure in STATA to make this conversion?

Thanks!



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



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