ftab {pairwise}R Documentation

Tabulating Answer Categories in Data

Description

function tabulating (answer) categories in X.

Usage

ftab(X, catgories = NULL, na.omit = FALSE)

Arguments

X

Data as a "matrix", a "data.frame" or even a "vector" or "factor". "vector" or "factor" are coerced to a "data.frame" with one column.

catgories

optional a vector ("numeric" or "character") containig the categories to tabulate. At default (catgories=NULL) the fuction looks for unique categories in X.

na.omit

logical (default: na.omit=FALSE ) wether to return frequencies for missing values, NAs.

Details

X can either be a ("numeric" or "character") "matrix" containing response vectors of persons (rows) or a "data.frame" containing "numeric", "character" or "factor" variables (columns).

Value

a "matrix" with category frequencies

Examples

########
data(bfiN)
ftab(bfiN)
data(sim200x3)
ftab(sim200x3)

[Package pairwise version 0.6.1-0 Index]