* 1. Topcode if "`topcode'" != "" quietly replace `tempvar' = `topcode' if `tempvar' > `topcode' & `tempvar' < . if "`verbose'" != "" di as text "Topcoded at: `topcode'" local transform_count = `transform_count' + 1
* Drop old variable if requested if "`dropold'" != "" & "`replace'" == "" drop `oldvar' if "`verbose'" != "" di as text "Dropped original variable: `oldvar'" gtools macro
* Multiple transformations gtools_macro income, topcode(200000) stdize generate(income_std) `topcode' & `tempvar' <
local vars "mpg weight displ" local quoted : list local(vars) @ "``'" di "`quoted'" // Output: "mpg" "weight" "displ" gtools macro