getCT {cabootcrs} | R Documentation |
getCT
recodes a data matrix from one format (n objects by p variables,
counts for distinct combinations of p variables, indicator matrix or Burt matrix) into a contingency table,
for cases where table() doesn't work
getCT(
Xinput,
input = "nbyp",
Jk = NULL,
maxcat = NULL,
varandcat = TRUE,
vars = NULL
)
Xinput |
A data matrix, in the form of a data frame or similar |
input |
See |
Jk |
See |
maxcat |
See |
varandcat |
See |
vars |
A list of the variable numbers to be used in the contingency table when there are more than 2. |
A contingency table, giving counts for the two cross-classified variables
Other conversion functions:
convert()
,
getBurt()
,
getdoubled()
,
getindicator()
nishCTvars23 <- getCT(NishData,Jk=rep(3,4),vars=2:3)