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, is already up and running.

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

Re: st: Re: changing variable case

From   Phil Clayton <>
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)


On 28/11/2012, at 3:47 PM, Michael Stewart <> 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:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index