Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: renpfix error 'variable already defined'


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: renpfix error 'variable already defined'
Date   Tue, 23 Aug 2005 18:02:12 +0100

There are indeed other ways to rename variables. 
Naturally, they all use -rename- at some point. 

Apart from -rename- itself, -renvars- is one 
user-written command. -search renvars- and 
download from the STB site. 

However, I am not clear that you need to 
rename at all in your case. 

Nick 
n.j.cox@durham.ac.uk 

Scheller, Percy Eckhard

> i want to create a timeseries table of a least 5 datasets and 
> a multiresponse question with 26 items/variables using the 
> 'mrtab' command.
> 
> unfortunatelly the set of 26 variables has different names, 
> like m78ort, m78wiss ... for the 1978 dataset and m02ort, 
> m02wiss for the 2002 dataset. therefor i appended the 
> datasets and tried to rename the variables with the renpfix 
> command to an less  specified name (mort etc.). but this 
> works only once. if the variables are already defined you get 
> the error "variable already defined".
> 
> do i missunderstood the command or is there an other way to 
> rename a bunch of variables?

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index