Number every distinct value in arr (smallest gets 0, next gets 1,
and so on). Pass the same map to several calls of
contingency_table_with_categories to get tables that share the
exact same rows and columns.
Count how often each pair (col1[i], col2[i]) occurs and return the
counts as a 2D table. Rows and columns are ordered by value, so the
result does not depend on the order of the inputs.
Like contingency_table, but the rows and columns are fixed by the
maps you pass in. Use this when several tables need the same shape,
even if some values are missing from a particular table.