Skip to contents

Computes the Russell-Rao distance between two binary vectors.

Usage

distance_russelrao_cpp(x, y)

Arguments

x

(required, numeric). Binary vector of 1s and 0s.

y

(required, numeric) Binary vector of 1s and 0s of same length as x.

Value

numeric

Examples

distance_russelrao_cpp(c(0, 1, 0, 1), c(1, 1, 0, 0))
#> [1] 0.5