Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[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   Max.Livingston@ny.frb.org
To   statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index