subtable {extracat}R Documentation

data.frame reduction

Description

Reduces a dataframe into a frequency table with prespecified entries.

Usage

subtable(dset, cols, keep.zero = TRUE, allfactor = TRUE, freqvar = NULL)

Arguments

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.

Value

A data.frame.

Author(s)

Alexander Pilhoefer
Department for Computer Oriented Statistics and Data Analysis
University of Augsburg
Germany

References

Alexander Pilhoefer New approaches in visualization of categorical data: R-package extracat
Journal of Statistical Software, submitted Jan 2010

Examples

hs2 = subtable(housing,c(3,1))
summary(hs2)

[Package extracat version 1.0-0 Index]