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: how to DE-CAPITALISE variables?


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: how to DE-CAPITALISE variables?
Date   Mon, 28 Jun 2010 18:29:21 +0100

-renvars- is from the SJ. -search renvars- for locations. 

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

Lachenbruch, Peter

renvars varlist,lower
seems easiest

Maarten buis

--- Josef Montag wrote
> I have a dataset in which all variable names are in CAPITAL letters.
> Is there a simple way how to de-capitalise them?


foreach var of varlist _all {
    local lower = lower(`var')
    rename `var' `lower'
}


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