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

st: RE: rename variables UPPERCASE to lowercase


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: rename variables UPPERCASE to lowercase
Date   Mon, 26 Apr 2004 13:10:14 +0100

There are various solutions, depending 
on whether you want to use general or 
specific tools. 

Most specific is -tolower- on SSC. 
But don't bother with that. Even its author
doesn't like it any more. 

Way more general is -renvars- from STB-60. 
About 80% of its authors still like it. 

But you don't need either, although -renvars- 
could still be useful for other problems. 

foreach v of var * { 
	rename `v' `=lower(`v')' 
} 

will do the job for you. 

Nick 
[email protected] 

Ada Ma
> 
> I need to convert all variable names from UPPERCASE to 
> lowercase.  How can I do that?

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index