Calculate similarity coefficient with the Jaccard Index

overlap_jaccard_index(x, y)

Arguments

x

Character vector, corresponding to set 1

y

Character vector, corresponding to set 2

Value

A numeric value between 0 and 1

Examples

a <- seq(1, 21, 2)
b <- seq(1, 11, 2)
overlap_jaccard_index(a, b)
#> [1] 0.5454545