Statalist


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

st: AW: change prefix of observation


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: change prefix of observation
Date   Mon, 2 Nov 2009 09:52:42 +0100

<> 

Two possibilities:

*************
clear*
inp str10 var1
"alpha"
end

expand 2

replace var1= /* 
*/ subinstr(var1,"a","1",1) /* 
*/ in 1

replace var1= "1"+substr(var1,2,.) in 2

list, noo
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von "Elisabeth
Müller"
Gesendet: Montag, 2. November 2009 09:45
An: [email protected]
Betreff: st: change prefix of observation

Hello,

does anybody know how to change the prefix of an observation (not variable)?
E.g. if I want to change the observation "alpha" into "1lpha"?

Thanks
-- 
Neu: GMX DSL bis 50.000 kBit/s und 200,- Euro Startguthaben!
http://portal.gmx.net/de/go/dsl02

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
*
*   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/


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