get_cooccurrence_stats: Calculates the number of elements common between columns of...

View source: R/CrossExpression.R

get_cooccurrence_statsR Documentation

Calculates the number of elements common between columns of two matrices. This function performs a simple dot product when binarize = FALSE.

Description

Calculates the number of elements common between columns of two matrices. This function performs a simple dot product when binarize = FALSE.

Usage

get_cooccurrence_stats(matrix1, matrix2, sparse = TRUE, binarize = TRUE)

Arguments

matrix1

The first input matrix.

matrix2

The second input matrix.

sparse

If TRUE, coerces matrices to sparse format for efficiency.

binarize

If TRUE, converts matrices to binary format to count the number of common elements.

Value

Returns a column by column matrix, where entries represent the number of common elements.


CrossExpression documentation built on Aug. 8, 2025, 7:25 p.m.