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
Michael Stewart <[email protected]>
To
[email protected]
Subject
Re: st: Re: changing variable case
Date
Wed, 28 Nov 2012 07:13:33 -0500
Thank you very much nick, phil and ryan for the advice.It is very helpful.
On Wed, Nov 28, 2012 at 12:35 AM, Ryan Kessler
<[email protected]> wrote:
> Hi Mike,
>
> This can be accomplished by nesting the lower function within a foreach loop:
>
> sysuse auto, clear
> foreach v of varlist * {
> if substr("`: type `v''",1,3) == "str" replace `v' = lower(`v')
> }
>
> Ryan Kessler
>
> On Wed, Nov 28, 2012 at 12:17 AM, 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/
--
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/