Signac (version 0.2.4)

Jaccard: Calculate the Jaccard index between two matrices

Description

Finds the Jaccard similarity between rows of the two matricies. Note that the matrices must be binary, and any rows with zero total counts will result in an NaN entry that could cause problems in downstream analyses.

Usage

Jaccard(x, y)

Arguments

x

The first matrix

y

The second matrix

Value

Returns a matrix

Details

This will calculate the raw Jaccard index, without normalizing for the expected similarity between cells due to differences in sequencing depth.

Examples

Run this code
# NOT RUN {
x <- matrix(data = sample(c(0, 1), size = 25, replace = TRUE), ncol = 5)
Jaccard(x = x, y = x)
# }

Run the code above in your browser using DataCamp Workspace