Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: reshaping long when the numeric part is in the middle of the string


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: reshaping long when the numeric part is in the middle of the string
Date   Thu, 23 Jun 2011 00:05:14 +0100

The implication that -renvars- is of use for renaming is one that I
would endorse. However, the advice to install -renvars- from SSC will
not work. -renvars- is to be sought in the Stata Journal archives, as
starting with -findit renvars- will reveal.

Nick

On Wed, Jun 22, 2011 at 8:17 PM, William R. Buchanan
<William@williambuchanan.net> wrote:
> - ssc install renvars -
> - help renvars -
>
> Sent from my iPhone
>
> On Jun 22, 2011, at 3:07 PM, "Diogo L Pinheiro" <diogolp@comcast.net> wrote:

>> 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"?

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index