Skip to contents

This function calculates the edit distance between a pair of relevés (rel1 and rel2).

Usage

edit_dist_rel(rel1, rel2)

Arguments

rel1

vector A numerical vector of 1 (presences) and 0 (absences), representing a first relevé.

rel2

vector A numerical vector of 1 (presences) and 0 (absences), representing a second relevé.

Value

A numeric value with the edit distance (Hamming distance).

Details

This function calculates the edit distance between the given pair of relevés. The relevés should come from the same relevé table, thus should have the same length. By having the same length, this is also called the Hamming distance.

Author

Tiago Monteiro-Henriques. E-mail: tmh.dev@icloud.com.