R/jaccardIndex.R
overlapCoefficient.Rd
Overlap coefficient, also known as Szymkiewicz-Simpson coefficient
overlapCoefficient(x, y, checkUniqueNonNA = FALSE)
overlapDistance(x, y, checkUniqueNonNA = FALSE)
The overlap coefficient
overlapCofficient
calculates the overlap coefficient, and
overlapDistance
is defined by 1-overlapCoefficient
.
myX <- 1:6
myY <- 4:9
overlapCoefficient(myX, myY)
#> [1] 0.5
myY2 <- 4:10
overlapCoefficient(myX, myY2)
#> [1] 0.5
## compare the result with Jaccard Index
jaccardIndex(myX, myY2)
#> [1] 0.3
## overlapDistance
overlapDistance(myX, myY2)
#> [1] 0.5