Imat2cat | R Documentation |
Convert a matrix of binary indicators to categorical variables
Imat2cat(binary_mat, cause_list, pathogen_list)
binary_mat |
The matrix of binary indicators. Rows for subjects, columns for pathogens in the |
cause_list |
The list of causes |
pathogen_list |
The complete list of pathogen names |
A vector of categorical variables. Its length equals the length of "allowed.list"
Imat2cat(rbind(diag(3),c(1,1,0),c(0,0,0)),c("A","B","C","A+B","NoA"),c("A","B","C"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.