Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re:'Wildcard with exceptions' syntax


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: Re:'Wildcard with exceptions' syntax
Date   Fri, 29 Dec 2006 14:10:15 -0500

Kelvin wants to use a wildcard list and remove a couple of elements from the list. The list macro functions are useful in that regard:

webuse auto,clear
tab rep78,g(RR)
unab rnames: RR*
local dontwant RR2 RR4
local rnames1 : list rnames - dontwant
di "`rnames1'"
su `rnames1'


Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index