This function is used by the Tabulate dialog.
It calls the
table function.
The results can be printed in table form.
The return value is a data frame with counts and factors that
can be displayed with Trellis graphics.
a character vector of variable names listing the variables to be
tabulated.
OPTIONAL ARGUMENTS:
data
the data frame in which to find the variable named in
varnames.
If missing, the variables will be looked for on the search list.
max.numeric.levels
the maximum number of unique values to consider as separate categories.
Numeric variables with more than this many unique values
will be binned.
nbins
the number of bins to use for numeric variables.
The bins are of equal width and cover the range of the variable.
print.p
if
TRUE, a table of counts is printed.
save.name
name under which to save the data frame of counts.
show.p
if
TRUE and
save.name is specified, the data set of counts will be
displayed in a Data window.
VALUE:
invisibly returns a data frame of counts and factors.
The first
length(varnames) columns are named
varnames
and the last column is named
Count.
Each row lists a combination of levels of
varnames
and the count of that combination.
SIDE EFFECTS:
A table of the results is printed if
print.p is
TRUE.