Compact Listing of a Single Variable (STB-17: dm16) ------------------------------------ ^lw^ varname [^if^ exp] [^in^ range] [^, c^ols^(^#^)^ [^o^bsno|^r^ownum|^n^] ^l^inenum ^d^ense ^f^ormat^(%^fmt^) w^idth(#) ^noh^ead ] Description ----------- ^lw^ (list wide) displays a variable across a page rather than, as does ^list^, down the page. ^list^ is fine for displaying several veraibles but wastes space when listing a single variable. ^lw^ can be helpful (especially with the ^obsno^ option) when searching for data errors since you can scan more data at once. Options ------- ^cols(^#^)^ sets the total number of items to be displayed on a line. An item is a data value or an (optional) observation number. The default is to display as many columns as will fit (see ^width()^ below). The number of columns actually used is saved in $S_1. ^obsno^ (synonums ^rownum^ and ^n^) displays the observation numbers as well as the data; the default is to display soley the data. If ^obsno^ is specified, the the observation number followed by a fullstop (period) is listed in front of each data value. A variation especially useful for persons with mono- chrome monitors is available (see technical note below). Note that the observation numbers count as items in ^cols()^. If ^obsno^ is specified, half the items on each row will be observation numbers with the remaining half the corresponding data values. If # is odd and greater than 1, only # - 1 items will be displayed per line. ^linenum^ is a variation on ^obsno^; it displays the observation number only once per line, listing the observation number at the start of the line. The number of data values per line will be one fewer than the number of items as specified by ^cols()^. Options, continued ------------------ ^dense^ lists the data more densely than otherwise by placing the columns closer together. ^format(%^fmt^)^ specifies the display format for displaying the data values. Its use is not encouraged because ^lw^ engages in sophisticated logic to deter- mine the format on its own. ^width(^#^)^ specifies the maximum number of characters per line; the default is 79. # must lie between 10 and 32000 inclusive. ^nohead^ suppresses the header at the top identifying the variable and the number of observations listed. Technical note -------------- On color-text monitors, the optionally presented observation numbers are shown in green and the data in yellow. On monochrome-text monitors, the observation numbers are not so clearly distinguished. To remedy this, ^lw^ offers the alternative of surrounding the the observation numbers with [] square brackets. Define the global macro S_LW by typing: . ^global S_LW ""^ This need be done only once per session. (You might wish to include this in a do-file as part of your start-up procedure; see [1] start/stop.) The default display mode can be reestablished by typing: . ^global S_LW^ Examples -------- . ^lw mpg^ . ^lw mpg, obsno . ^lw mpg if foreign, cols(11) linenum^ Authors ------- Patrick Royston, Royal Postgraduate Medical School, London Peter Sasieni, Imperial Cancer Research Fund, London FAX (011)-44-81-740 3119 (Royston) (011)-44-71-269 3429 (Sasieni) Also see -------- STB: dm16 (STB-17) Manual: [5u] list, [2] formats On-line: ^help^ for ^list^