Stata Unab
-ubav- un-abbreviates names.
Contents
Usage
Given a macro defined like var1 var2 var3, it is possible to write syntax like:
foreach var of local list {
display "`var'"
}This is not possible with a macro defined like var1-var3, i.e. a variable list that needs to be expanded.
-unab- parses abbreviated names and sets a local macro with the un-abbreviated equivalent.
unab newlist: `list'
foreach var of local newlist {
display "`var'"
}