getindicator {cabootcrs} | R Documentation |
Converting a data matrix into an indicator matrix
Description
getindicator
recodes a data matrix from one format (n objects by p variables,
counts for distinct combinations of p variables, contingency table) into an indicator matrix
Usage
getindicator(
Xinput,
input = "nbyp",
Jk = NULL,
maxcat = NULL,
varandcat = TRUE
)
Arguments
Xinput |
A data matrix, in the form of a data frame or similar |
input |
See |
Jk |
See |
maxcat |
See |
varandcat |
See |
Value
An indicator matrix, where a variable with J_k categories is represented by J_k columns and a data point taking the i-th category has 1 in the i-th of these columns and a zero in the others
See Also
Other conversion functions:
convert()
,
getBurt()
,
getCT()
,
getdoubled()
Examples
nishindicator <- getindicator(NishData)
[Package cabootcrs version 2.1.0 Index]