# Small example with binary matrix
mat <- matrix(c(
1, 0, 1,
1, 1, 0,
0, 1, 1
), nrow = 3, byrow = TRUE)
# Example with Jaccard
dbrobust::dist_binary(mat, method = "jaccard")
# Example with Hamming
dbrobust::dist_binary(mat, method = "hamming")
Run the code above in your browser using DataLab