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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: changing names from UPPER to lower case


From   "Lachenbruch, Peter" <Peter.Lachenbruch@oregonstate.edu>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: changing names from UPPER to lower case
Date   Fri, 19 Mar 2010 09:19:47 -0700

Dear all,
I have a number of variables in uppercase that I want to change to lower case.  I can do it individually, of course, but when I try to do it in a foreach loop  I get

. foreach v of varlist ILD-CUTIC_OG{
  2. rename `v' lower(`v')
  3. }
 ( not allowed
 r(101);

. foreach v of varlist ILD-CUTIC_OG{
  2. rename `v' lower("`v'")
  3. }
 ( not allowed
 r(101);

Apparently rename doesn't allow this function.
I went ahead with the individual changes, but is there a simple way that I'm
missing?  I've looked at the manual entries for the lower function, the rename command, etc.

Tony

Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001



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