ji: compute Jaccard Index of two sets

Description Usage Arguments Details Examples

View source: R/data.R

Description

The Jaccard Index of two sets is defined as the ratio of the size of the set intersection (common element) and the size of the set union (all elements).

Usage

1
ji(a, b)

Arguments

a

vector of set elements

b

vector of set elements

Details

The name is short for: (j)accard (i)ndex

Examples

1
ji(c(1,2,3), c(1,4,5)) # one common element out of five, JI=0.2 

tkonopka/shrt documentation built on March 5, 2020, 2:51 p.m.