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

st: RE: Rename from UPPER to lowercase


From   "David Harrison" <[email protected]>
To   <[email protected]>
Subject   st: RE: Rename from UPPER to lowercase
Date   Fri, 28 Jan 2005 09:56:29 -0000

Yes, e.g.

foreach v of varlist A B C {
	ren `v' `=lower("`v'")'
}

But for flexible manipulation of variable names (including changing case), look at the -renvars- package:

findit renvars

David
[email protected]

-----Original Message-----
From: Paolo Grillo, MD [mailto:[email protected]]
Sent: 28 January 2005 09:47
To: [email protected]
Subject: st: Rename from UPPER to lowercase


I would like to rename a lot of varname from UPPER to lower case 
maintaining the same variable name.
Is it possible to use foreach?.
Thanks
Paolo Grillo

-- 



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 

Paolo Grillo MD
Nephrologist 
Statisticians
EPOCA Research Center for Occupational, Clinical & Environmental Epidemiology
Department of Occupational and Environmental Health "Clinica L. Devoto"
University of Milan
Via San Barnaba 8
20122 Milano - ITALY
Tel: +39 02 503-20148
Fax: +39 02 503-20126
E-Mail [email protected]



*
*   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/



*
*   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