This function allows to explore the edit distances between all the relevés of a relevé matrix.
Arguments
- m
matrixA relevé matrix (each column containing a phytosociological relevé) of 1 (presences) and 0 (absences), representing a first relevé.- max.dist
Use
NULLto obtain the edit distances between all relevé pairs or anumericvalue to identify only the pairs of relevés with an edit distance lower than that value.- plot.im
If
TRUEusesimageto plot an image of the result.FALSEotherwise.
Value
A list with two components. If max.dist = NULL the first component ('dist.matrix') contains a matrix with all the obtained edit distances (the optional plot will show all distances using heat.colors function). If max.dist is a numeric value, the matrix will be binary, where 0 means the edit distance is greater than max.dist and 1 means that the edit distance is lower than or equal to max.dist (and optional plot will depict such binary matrix). The second component ('close.as.max.dist') is NA for max.dist = NULL and otherwise will return all the pairs of indices of the relevés for which the edit distance is lower than or equal to max.dist.
Details
This function aids the identification of very similar relevés i.e., pairs of relevés that by changing one (or a few) taxa will end up in exactly identical relevés. The function is mainly though to assist the detection of relevés republished by the authors with possible minor changes/corrections to them. Yet is also helpful as a visualization tool for the exploration of a relevé matrix and understanding its underlying structure.
Author
Tiago Monteiro-Henriques. E-mail: tmh.dev@icloud.com.