jaccardIndex: Calculate the Jaccard Index between two vectors

Description Usage Arguments Value Examples

View source: R/jaccardIndex.R

Description

Calculate the Jaccard Index between two vectors

Usage

1
2
3

Arguments

x

A vector

y

A vector

Value

The Jaccard Index, a number between 0 and 1

JaccardDistance is defined as 1-JaccardIndex.

Examples

1
2
3
4
5
6
7
8
9
myX <- 1:6
myY <- 4:9
jaccardIndex(myX, myY)
jaccardDistance(myX, myY)

myX <- LETTERS[1:5]
myY <- LETTERS[6:10]
jaccardIndex(myX, myY)
jaccardDistance(myX, myY)

ribiosUtils documentation built on March 13, 2020, 2:54 a.m.