I have a set of data that looks like this:
df <- data.frame(typeA = c(T,T,F,F,T,F,T,F), typeB = c(T,F,T,F,T,F,T,F), typeC = c(F,F,F,F,T,T,T,T))
and I would like to output a table that looks like
| | TypeA | TypeB | TypeC |
|-------|-------|-------|-------|
| TypeA | 4 | 3 | 2 |
| TypeB | 3 | 4 | 2 |
| TypeC | 2 | 2 | 4 |
where each cell is number of observations that has both row AND column TRUE.
eg: First row second column shows that there are 3 obs with TypeA == T && TypeB == T.
Also, what is the name of such table summary?