Bookmark and Share

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]

st: Is there a way to tell if a local macro contains a particular value


From   [email protected]
To   [email protected]
Subject   st: Is there a way to tell if a local macro contains a particular value
Date   Mon, 24 Dec 2012 11:34:20 -0500

Hi all,

Say I have a local macro with a list of variable names: local myvars var1 
var3 var5.

Now say I'm iterating over all my variables (var1-var6), and want to do 
something if the variable is in `myvars.' Is there a simple way to 
determine this?

Thanks,
Max


Max Livingston
Research Analyst
Microeconomic Studies
Research and Statistics Group
Federal Reserve Bank of New York
(212) 720-7894




This e-mail message, including attachments, is for the sole use of the intended recipient(s) and may contain confidential or proprietary information.  If you are not the intended recipient, immediately contact the sender by reply e-mail and destroy all copies of the original message.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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