help for slist

Smart listing of variables

slist [varlist] [if exp] [in range]
[,
decimal(number)
id(varlist)
noobs
label]

by ...: may not be used with slist.

varlist may contain any variable types; see help varlist.

Description

slist displays compact lists fitting the current width of the Results window.
If more than one line is needed, a new block of variables is created.
The current version 3.0 is Unicode-aware.
It has been tested with Stata version 11 and version 16.

Options

decimal(number) lets you select the number of decimals for floating point
numbers. If omitted, slist uses general format.

id(varlist) ensures that one or more id variables are displayed at the
beginning of each line.

noobs omits observation numbers. Frequently used in combination with
id(varlist).

label lists value labels instead of numerical codes for variables having value
labels. Value labels ar omitted by default.

Remarks

The list command is clumsy in displaying lists with more than a few variables.
slist displays compact lists with numeric codes, value labels being shown
only when explicitly requested.

slist compresses the data in memory and finds the most economic formats. This may
take some time with large uncompressed data sets, and it is recommended to keep your
data in compressed form, for this and other reasons; see compress.

Examples

. slist
. slist v1-v27
. slist , decimal(2)
. slist v1-v27 in 1/20 if sex == 1
. slist v1-v27 , noobs id(idno)
. slist , label

. slist in 3/4 , d(2) id(idno)

idno sex age wt ht smoke cigaret cheroot pipe agegr
3. 7 1 49 85 190 1 10 2 0 2
4. 11 2 71 85 166 2 0 0 0 3

idno tobacco bmi bmigr
3. 7 14 23.55 20
4. 11 0 30.85 30

Authors

Svend Juul, Department of Public Health, Aarhus University, Denmark.
(A prior version (2003) was co-authored by Jens M. Lauritsen and John Luke Gallup)