tabulate.data {lca}R Documentation

Count Cases

Description

Takes matrix of cases and returns object of class freq.table showing number of instances of each case.

Usage

tabulate.data(dat, ord = 1:(dim(dat)[2]), zeroes = FALSE, na.rm = FALSE)

Arguments

dat a matrix of values or factors, each row containing one case.
ord ordering on responses.
zeroes logical - should zero counts be dropped from output?
na.rm logical - should cases with missing values be ignored?

Details

Uses xtabs to build a contingency table which is then expanded to form column of a counts matrix.

Value

An object of class freq.table containing the counts.

Author(s)

Robin Evans

See Also

xtabs

Examples

x = matrix(c(1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,1,2,3,2,3,1,3,2,1,2,3,1,2,2,1,3,2),ncol=2)
x
tabulate.data(x)

[Package lca version 0.2 Index]