Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: deleting variables based on a certain condition

From   Nick Cox <>
Subject   Re: st: deleting variables based on a certain condition
Date   Tue, 3 Apr 2012 18:54:32 +0100

-findname- was recently updated in SJ 12(1) 2012 and on SSC. That was
announced on this list in

and should be evident from -search findname- in an up-to-date Stata
12. You need to look at the archives and also to update your copy of

Here is a way to do it with -findname-. No "addition" is needed.

sysuse auto, clear
gen FOO = 42

findname, all(regexm("@", "[A-Z]+")) local(SHOUTED)

drop `SHOUTED'

The local macro -SHOUTED- consists of names that you want.

That's a bit of an awkward way to do it, but still a way to do it.


On Tue, Apr 3, 2012 at 6:32 PM, Abhimanyu Arora
<> wrote:
> Dear statalist and Nick
> I have certain variables the names of which are in capitals. I would
> like to delete them altogether.
> Basically I am looking for a something in addition to what SSC's
> findname by Nick Cox does. Perhaps Nick has a newer version or somehow
> this one can suffice?
> . which findname
> c:\ado\plus\f\findname.ado
> *! 1.0.1 NJC 28 April 2010
> *! 1.0.0 NJC 30 March 2010
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index