Thanks to everyone who responded to my -rename- problem. I added an IF
command to the -foreach- loop and now have a solution that (a) ignores
variable names that are already lowercase and (b) stops execution of
the do-file if the names of two variables in the data differ only with
regard to upper or lower case.
ds
local vars "`r(varlist)'"
foreach v of local vars {
local newname = lower("`v'")
if "`v'" != "`newname'" rename `v' `newname'
}
The lines above can be replaced by a single command if -renvars- is installed.
. renvars, lower
Thanks again.
Friedrich
*
* 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/