tabulate.data {lca} | R Documentation |
Takes matrix of cases and returns object of class freq.table
showing
number of instances of each case.
tabulate.data(dat, ord = 1:(dim(dat)[2]), zeroes = FALSE, na.rm = FALSE)
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? |
Uses xtabs
to build a contingency table which is then expanded to
form column of a counts matrix.
An object of class freq.table
containing the counts.
Robin Evans
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)