dice: Sorensen-Dice coefficient

View source: R/statistics.R

diceR Documentation

Sorensen-Dice coefficient

Description

Computes 2 * |A intersection B| / (|A| + |B|). Returns 0 if both sets are empty (matches web tool convention).

Usage

dice(size_a, size_b, intersection)

Arguments

size_a

Inclusive size of set A (integer >= 0).

size_b

Inclusive size of set B (integer >= 0).

intersection

Inclusive intersection size |A intersection B|.

Value

Numeric in [0, 1].

Examples

dice(10, 10, 5)

vennDiagramLab documentation built on May 19, 2026, 1:07 a.m.