Skip to contents

Computes the Sørensen distance, suitable for presence/absence data.

Usage

distance_sorensen_cpp(x, y)

Arguments

x

(required, numeric vector).

y

(required, numeric vector) of same length as x.

Value

numeric

Examples

distance_sorensen_cpp(x = c(0, 1, 1, 0), y = c(1, 1, 0, 0))
#> [1] 0.5