Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Re: changing variable case


From   Phil Clayton <[email protected]>
To   [email protected]
Subject   Re: st: Re: changing variable case
Date   Wed, 28 Nov 2012 16:05:09 +1030

If you're not sure your message has been sent correctly, please check the Statalist web archive before reposting.

If you're using Stata 12 you can simply:
rename *, lower

Prior to Stata 12 you should be able to use something like this:
foreach var of varlist * {
	rename `var' `:  display lower("`var'")'
}

For more sophisticated renaming see -help rename group- in Stata 12, or for earlier versions of Stata -findit renvars- (Nick Cox and Jeroen Weesie)

Phil

On 28/11/2012, at 3:47 PM, Michael Stewart <[email protected]> wrote:

> Dear Stat List user ,
> 
> I am not sue if my previous post was sent in right fashion.Hence i am
> resending the e-mail.
> I have a large dataset with approximately 600 variables. Some are
> upper case and some are lower case.I  want to convert all of  them to
> lower case. Is there a stata command to convert all variables to lower
> case.I  tried varcase_all  but it toggles between the variable cases.
> 
> 
> -- 
> Thank you ,
> Yours Sincerely,
> Mike.
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index