Learn R Programming

ribiosUtils (version 1.5-6)

overlapCoefficient: Overlap coefficient, also known as Szymkiewicz-Simpson coefficient

Description

Overlap coefficient, also known as Szymkiewicz-Simpson coefficient

Usage

overlapCoefficient(x, y, checkUniqueNonNA = FALSE)

overlapDistance(x, y, checkUniqueNonNA = FALSE)

Arguments

x

A vector

y

A vector

checkUniqueNonNA

Logical, if TRUE, x and y are made unique and non-NA

Value

The overlap coefficient

See Also

jaccardIndex

overlapCofficient calculates the overlap coefficient, and overlapDistance is defined by 1-overlapCoefficient.

Examples

Run this code
# NOT RUN {
myX <- 1:6
myY <- 4:9
overlapCoefficient(myX, myY)

myY2 <- 4:10
overlapCoefficient(myX, myY2)
## compare the result with Jaccard Index
jaccardIndex(myX, myY2)

## overlapDistance
overlapDistance(myX, myY2)

# }

Run the code above in your browser using DataLab