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: Stata 12 bug report: -rename- with wild card (*) used in do-file


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Stata 12 bug report: -rename- with wild card (*) used in do-file
Date   Wed, 8 Aug 2012 17:13:24 +0100

-renvars- is from SJ. If you are using Stata 12, I'd recommend that
you learn -rename-. -renvars- yields no royalties to its authors, so
you would be cheating no one.

Nick

On Wed, Aug 8, 2012 at 5:06 PM, Gundi Knies <gknies@essex.ac.uk> wrote:
> thanks for the suggestions.
> turns out I had a redundant version control in my do-file (i.e. switching to
> Stata 11), and this wild card was only implemented in version 12.
> thanks also for pointing me to -renvars. it's neat.

On 08/08/2012 16:09, William Buchanan wrote:

>> Why not use one of the -renvars- functions if the only thing you are doing
>> is substituting "_" with "1_"?  Seems like it would make things much easier.

On Aug 8, 2012, at 7:54, Gundi Knies <gknies@essex.ac.uk> wrote:

>>> I was planning to use -renpfix- to change a series of variable prefixes
>>> in my data file but noted that users are pointed toward using -rename-
>>> instead. Fine ..
>>> Now, the issue is that I found that the following command does the
>>> desired renames if I execute it interactively in Stata 12, but not when I
>>> include it in a do-file:
>>> rename *_* *1_*
>>> The error message suggests the wild card * is an invalid name"=.
>>> Am I missing something?
*
*   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