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]

st: changing names from UPPER to lower case


From   "Lachenbruch, Peter" <[email protected]>
To   "'[email protected]'" <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index