Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: RE: problems with abbrev()


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: problems with abbrev()
Date   Mon, 19 Jan 2009 20:29:16 -0000

Otherwise put, I don't think -abbrev()- is a good function for your
problem. -abbrev()- is really intended to work with variable names, not
their contents. 

replace myvar = "acquired" if strpos(myvar, "acquired") 

may help. 

Nick 
[email protected] 

Martin Weiss

***********
clear*
input str20 mystring
"acquired by alcatel"
"acquired by cisco"
end
g newstring=word( mystring,1)
l
***********

Sara Brighi

I have come across a problem. I have a string variable made up of 2338 
observations. These observations differ in "private", "public", 
"defunct" and "acquired...."; but the "acquired" observations ever 
specify sth more (for instance "acquired by alcatel", or "acquired by 
cysco"..ecc). I need to use abbrev() in order to have only "acquired". 

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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