getCT {cabootcrs} | R Documentation |

## Converting a data matrix into a contingency table

### Description

`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

### Usage

```
getCT(
Xinput,
input = "nbyp",
Jk = NULL,
maxcat = NULL,
varandcat = TRUE,
vars = NULL
)
```

### Arguments

`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. |

### Value

A contingency table, giving counts for the two cross-classified variables

### See Also

Other conversion functions:
`convert()`

,
`getBurt()`

,
`getdoubled()`

,
`getindicator()`

### Examples

```
nishCTvars23 <- getCT(NishData,Jk=rep(3,4),vars=2:3)
```

[Package

*cabootcrs*version 2.1.0 Index]