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

st: RE: RE: string question


From   "Rodrigo Briceno" <rbriceno@sanigest.com>
To   <statalist@hsphsun2.harvard.edu>
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: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Wallace, John
Sent: Monday, October 25, 2004 4:39 PM
To: statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index