subtable {extracat} | R Documentation |
Reduces a dataframe into a frequency table with prespecified entries.
subtable(dset, cols, keep.zero = TRUE, allfactor = TRUE, freqvar = NULL)
dset |
The data.frame to reduce.
|
cols |
An ordered integer vector containing the indices of the colums to keep. |
keep.zero |
A logical indicating whether to include zero-cases in the output. |
allfactor |
A logical indicating whether to convert all variables into factor variables. Integer variables will be applied a fitting (non-lexicographic) level order. |
freqvar |
Optional name of a frequency variable in V .
If dset contains a variable called "Freq" (see ftable)
it will be defined as frequency variable if freqvar is unspecified.
|
A data.frame
.
Alexander Pilhoefer
Department for Computer Oriented Statistics and Data Analysis
University of Augsburg
Germany
Alexander Pilhoefer New approaches in visualization of categorical data:
R-package extracat
Journal of Statistical Software, submitted Jan 2010
hs2 = subtable(housing,c(3,1)) summary(hs2)