.BG
.VE $Header: /usr3/s/current/s/.help/RCS/table,v 1.2 83/12/30 19:35:33 rab Exp $
.FN table
.TL
table: Create Contingency Table from Categories
.CS
table(arg1, arg2, ...)
.PP
.AG arg
categories, as variables for the contingency table.
All `arg's must be of equal length.
Missing values (NAs) are allowed.
.RT
contingency table structure, i.e., a multi-way array with an
additional component `Label'.  This is a structure with one
component for each arg; the component corresponding to
`arg1' is named "arg1" and is a character vector containing
the values from `arg1$Label'.
.PP
The table contains counts of the number of times that
each particular combination of values of `arg1', `arg2', ..., occurred.
A combination is not counted if missing values are present in any `arg's.
If there is no missing data, `sum(table(a,b,...))' equals
`len(a)'.
.SH SEE ALSO
Functions `cut' and `code' create categories;
`tprint' prints tables, and `tapply' can be used for applying
functions to observations in table cells.
.EX
tprint( table(age,sex,race,income) )  # print contingency table
.KW basic*
.KW category
.KW contingency table
.KW reports
.WR
