Contingency Table

contingency_matrix(M1, M2, include_self, exclude)

Arguments

M1, M2

Two integer matrices of the same size.

include_self

Logical scalar. When TRUE the diagonal is included in the calculation.

exclude

Integer vector. List of indices to include during the calculation. For example, if individual 2 needs to be excluded, setting exclude = c(2) will include the second rows and columns from calculation.