Home  >>  Archives  >>  Volume 10 Number 2  >>  dm0048

The Stata Journal
Volume 10 Number 2: pp. 281-296



Subscribe to the Stata Journal
cover

Speaking Stata: Finding variables

Nicholas J. Cox
Department of Geography
Durham University
Durham City, UK
[email protected]
Abstract.  A standard task in data management is producing a list of variable names showing which variables have specific properties, such as being of string type, or having value labels attached, or having a date format. A first-principles strategy is to loop over variables, checking one by one which have the property or properties concerned. I discuss this strategy in detail with a variety of examples. A canned alternative is offered by the official command ds or by a new command, findname, published formally with this column.
Terms of use     View this article (PDF)

View all articles by this author: Nicholas J. Cox

View all articles with these keywords: findname, ds, variable names, variable labels, value labels, types, formats, characteristics, data management

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS