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


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

st: RE: changing names from UPPER to lower case


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: changing names from UPPER to lower case
Date   Fri, 19 Mar 2010 17:25:26 +0100

<>


Use NJC`s 

*************
ssc d tolower
*************


HTH
Martin


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Lachenbruch,
Peter
Sent: Freitag, 19. März 2010 17:20
To: 'statalist@hsphsun2.harvard.edu'
Subject: st: changing names from UPPER to lower case 

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/


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