Statalist The Stata Listserver


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

Re: st: excluding variables from varlist


From   M Hollis <[email protected]>
To   [email protected]
Subject   Re: st: excluding variables from varlist
Date   Thu, 25 May 2006 12:02:56 -0700 (PDT)

I've just learned about the existence of -ds- from a
previous statalist post, but would this also work?

ds a b c, not
foreach var in varlist `r(varlist)' {
....
}


--- Thomas <[email protected]> wrote:

> Hi,
> 
> using the foreach command I would like to exclude
> certain variables, e.g:
> "foreach var of varlist _all [/excluding a, b, c/]".
> 
> Is that possible and if so how?
> 
> Thanks,
> 
> Thomas
> 
> -- 
> ______________________________
> Thomas Triebs
> Research Assistant
> Electricity Policy Research Group
> Faculty of Economics
> University of Cambridge
> Sidgwick Avenue, Austin Robinson Bldg.
> Cambridge CB3 9DE
> United Kingdom
> Phone: +44-1223-335287
> Fax: +44-1223-335299
> http://www.econ.cam.ac.uk
> http://www.electricitypolicy.org.uk
> 
> *
> *   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/
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
*
*   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