📄 tabdisp.hlp
字号:
{smcl}
{* 10feb2005}{...}
{cmd:help tabdisp}
{hline}
{title:Title}
{p2colset 5 20 22 2}{...}
{p2col :{hi:[P] tabdisp} {hline 2}}Display tables{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 16 2}
{cmd:tabdisp} {it:rowvar} [{it:colvar} [{it:supercolvar}]]
{ifin}{cmd:,}
{cmdab:c:ellvar:(}{it:varnames}{cmd:)} [{cmd:by(}{it:superrowvars}{cmd:)}
{opth f:ormat(%fmt)} {cmdab:cen:ter} {cmdab:l:eft}
{cmdab:con:cise} {cmdab:m:issing} {cmdab:t:otals} {cmd:dotz}
{cmdab:cellw:idth:(}{it:#}{cmd:)} {cmdab:csep:width:(}{it:#}{cmd:)}
{cmdab:scsep:width:(}{it:#}{cmd:)} {cmdab:stubw:idth:(}{it:#}{cmd:)}]
{phang}
{cmd:by} may be used with {cmd:tabdisp}; see {helpb by}.
{pstd}
{it:rowvar}, {it:colvar}, and {it:supercolvar} may be numeric or string
variables.
{title:Description}
{pstd}
{cmd:tabdisp} displays data in a table. {cmd:tabdisp}
calculates no statistics and is intended for use by programmers.
{pstd}
For the corresponding command that calculates statistics and displays them
in a table, see {helpb table}.
{pstd}
Although {cmd:tabdisp} is intended for programming applications, it can be
used interactively for listing data.
{title:Options}
{phang}{cmd:cellvar(}{it:varnames}{cmd:)} is required; it specifies the
numeric or string variables containing the values to be displayed in the
table's cells. Up to five variable names may be specified.
{phang}{cmd:by(}{it:superrowvars}{cmd:)} specifies numeric or string
variables to be treated as {it:superrows}. Up to four variables may be
specified here.
{phang}{opth format(%fmt)} specifies the display format for
presenting numbers in the table's cells. {cmd:format(%9.0g)} is the default;
{cmd:format(%9.2f)} is a popular alternative. The width of the format you
specify does not matter except that {cmd:%}{it:fmt} must be valid. The width
of the cells is chosen by {cmd:tabdisp} to be what it thinks looks best. Option
{cmd:cellwidth()} allows you to override {cmd:tabdisp}'s choice.
{phang}{cmd:center} specifies results are to be centered in the table's cells.
The default is to right-align results. For centering to work well, you
typically need to specify a display format as well. {cmd:center format(%9.2f)}
is popular.
{phang}{cmd:left} specifies that column labels be left-aligned. The
default is to right-align column labels to distinguish them from supercolumn
labels, which are left-aligned. If you specify {cmd:left}, both column
and supercolumn labels are left-aligned.
{phang}{cmd:concise} specifies that rows with all missing entries not
be displayed.
{phang}{cmd:missing} specifies that, in cells containing missing values, the
missing value ({cmd:.}, {cmd:.a}, {cmd:.b}, ..., or {cmd:.z}) be
displayed. The default is that cells with missing values are left blank.
{phang}{cmd:totals} specifies that observations where {it:rowvar},
{it:colvar}, {it:supercolvar}, and/or {it:superrowvars} contain the system
missing value ({cmd:.}) be interpreted as containing the corresponding
totals of {cmd:cellvar()}, and that the table be labeled accordingly.
If option {cmd:dotz} is also specified, observations where the stub
variables contain {cmd:.z} will be thus interpreted.
{phang}{cmd:dotz} specifies that the roles of missing values {cmd:.} and
{cmd:.z} be interchanged in labeling the stubs of the table. By
default, if any of {it:rowvar}, {it:colvar}, {it:supercolvar}, and
{it:superrowvars} contain missing ({cmd:.}, {cmd:.a}, {cmd:.b}, ..., or
{cmd:.z}), then "{cmd:.}" is placed last in the ordering. {cmd:dotz}
specifies that {cmd:.z} be placed last. In addition, if option
{cmd:totals} is specified, {cmd:.z} values rather than "{cmd:.}" values
will be labeled "Total".
{phang}{cmd:cellwidth(}{it:#}{cmd:)} specifies the width of the cell in units
of digit widths; 10 means the space occupied by 10 digits, which is
0123456789. The default {cmd:cellwidth()} is not a fixed number, but a number
chosen by {cmd:tabdisp} to spread the table out while presenting a reasonable
number of columns across the page.
{phang}{cmd:csepwidth(}{it:#}{cmd:)} specifies the separation between columns
in units of digit widths. The default is not a fixed number, but a number
chosen by {cmd:tabdisp} according to what it thinks looks best.
{phang}{cmd:scsepwidth(}{it:#}{cmd:)} specifies the separation between
supercolumns in units of digit widths. The default is not a fixed number, but
a number chosen by {cmd:tabdisp} according to what it thinks looks best.
{phang}{cmd:stubwidth(}{it:#}{cmd:)} specifies the width, in units of digit
widths, to be allocated to the left stub of the table. The default is not a
fixed number, but a number chosen by {cmd:tabdisp} according to what it thinks
looks best.
{title:Examples}
{phang}{cmd:. tabdisp a b, cell(c)}
{phang}{cmd:. tabdisp sex response group, cell(pop)}{p_end}
{phang}{cmd:. tabdisp sex response group, cell(pop) center}
{title:Also see}
{psee}
Manual: {bf:[P] tabdisp}
{psee}
Online: {helpb collapse}, {helpb table}, {helpb tabulate}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -