{smcl} {* *! version 1.2.0 02jun2011}{...} {findalias asfradohelp}{...} {vieweralsosee "" "--"}{...} {vieweralsosee "[R] help" "help help"}{...} {viewerjumpto "Syntax" "examplehelpfile##syntax"}{...} {viewerjumpto "Description" "examplehelpfile##description"}{...} {viewerjumpto "Options" "examplehelpfile##options"}{...} {viewerjumpto "Remarks" "examplehelpfile##remarks"}{...} {viewerjumpto "Examples" "examplehelpfile##examples"}{...} {title:preserve_labels} {phang} Keep labels before and after collapse... pretty much just passing in the collapse statement (in quotes) into a small program example: sysuse auto, clear count preserve_labels "collapse (mean) mpg price weight, by(foreign)" count ************************************************************************************************************** If you want the full syntax of how to keep each label without the wrapper command: sysuse auto, clear foreach var of varlist * { local `var': variable label `var' } collapse (mean) mpg price weight, by(foreign) foreach var of varlist * { label var `var' "``var''" } end