Amadou wrote:
At 08:27 AM 8/11/2004 -0400, you wrote:
Nick,
When I talk about working inside macros, I am thinking of something
like this:
I know that one can increment a macro by doing: local myvars "`myvars' var1"
But why can't we REMOVE var1 from the macro myvars?
Something like (it's just an example, but maybe you have another syntax):
local myvars "`myvars' , -var1"
(where -var1 is intented to tell Stata to remove var1 from myvars).
[...]
You should check -help macrolists-, in particular, you would want...
local toremove "var1"
local myvars: list myvars - toremove
to do what you meant by...
local myvars "`myvars' , -var1"
You could also use a separate name, if you prefer:
local mynewvars: list myvars - toremove
But do see -help macrolists- for a large set of macro list operations.
I hope this helps.
-- David
David Kantor
Institute for Policy Studies
Johns Hopkins University
[email protected]
410-516-5404
*
* 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/