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]
Re: st: Drop variables based on variable label
From
daniel klein <[email protected]>
To
[email protected]
Subject
Re: st: Drop variables based on variable label
Date
Wed, 28 Dec 2011 12:13:13 +0100
Antonis' idea to use -ds- is good. Actually it seems -ds- is all that
is needed, as these two lines
ds ,has(varl "rs*")
drop `r(varlist)'
will do the same as the loop with the combination of extended
functions and -substr()-, but faster.
Best
Daniel
*
* 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/