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: Delete upper case variable

From   Christopher Baum <>
To   "" <>
Subject   re: st: Re: Delete upper case variable
Date   Sun, 22 Apr 2012 17:41:23 -0400

sysuse auto, clear
rename price PRICE
rename rep78 REP78
ds *
loc vl `r(varlist)'
loc todrop
foreach w of loc vl {
	loc zap = cond("`w'" == upper("`w'"),"`w'"," ")
	loc todrop "`todrop' `zap'"
di "`todrop'"
drop `todrop'


Kit Baum   |   Boston College Economics & DIW Berlin   |
                             An Introduction to Stata Programming  |
  An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

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