Dear Statalisters,
I have a macro `covars' which is a list of variables, var1 var2
var3... var19 var20
I would like to exclude the last variable, var20, from `covars' so
this is what I did:
local revcovs=reverse("`covars'")
gettoken dropped revcovs: revcovs
local covars=reverse("`revcovs'")
I'm sure there must be some way more elegant, just that I can't think
of it. Any suggestions?
Elegance aside, my variable list, if too long, would get truncated
because I assigned the macro revcovs with the "=" sign in the first
line of my above code. Is there anyway to avoid the "=' sign in that
line?
Thanks in advance for any suggestions!
Kelvin
*
* 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/