Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: reshaping long when the numeric part is in the middle of the string
From
"Diogo L Pinheiro" <[email protected]>
To
<[email protected]>
Subject
st: reshaping long when the numeric part is in the middle of the string
Date
Wed, 22 Jun 2011 15:07:57 -0400
Hello, everyone
I want to reshape long a series of variables, but I am running into problems
because the numeric part that would identify them is in the middle of the
variable name. In this case, the variables look something like
"variable1_other, variable2_other, variable3_other" and so on. Is there a
similar command to reshape long that would do it by identifying those
numbers, so that I wouldn't have to rename the hundreds of variables I have?
And if I don't have an alternative but to rename them, is there a more
efficient way of doing that in one batch than commands like "for var
varlist"?
Thanks in advance
Diogo
*
* 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/