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

st: RE: string question


From   "Wallace, John" <[email protected]>
To   <[email protected]>
Subject   st: RE: string question
Date   Mon, 25 Oct 2004 15:38:37 -0700

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index