Skip to main content

cross_tabulate

Function cross_tabulate 

Source
pub fn cross_tabulate(
    x: &TextArrayV,
    y: &TextArrayV,
) -> Result<(Vec64<Vec64<u64>>, Vec64<String>, Vec64<String>, usize), KernelError>
Expand description

Cross-tabulate two text array views into a contingency table.

Iterates both views in lockstep, discovering categories on first appearance and incrementing the corresponding cell for each jointly non-null pair. Null positions in either array cause the row to be skipped.

Returns the count matrix, row labels from x, column labels from y, and total number of valid pairs counted.