Learn R Programming

monogeneaGM (version 1.1)

pwdist: Pairwise Euclidean distances between landmarks

Description

This function computes all possible n(n-1)/2 pairwise Euclidean distances between n landmarks.

Usage

pwdist(x, average = TRUE)

Arguments

x
a two-column matrix for the xy landmark coordinates
average
if TRUE, the pairwise distances for both left and right anchors are averaged. For data quality checks, set to FALSE

Details

Comparison of the pairs of pairwise Euclidean distance from the left and right form of anchors is the basis of the quality control procedure implemented in Qscore. In addition, pairwise Euclidean distances provide length variables useful for the analysis of size variation (Lele & Richtsmeier, 2001).

References

Khang TF, Soo OYM, Tan WB, Lim LHS. (2016). Monogenean anchor morphometry: systematic value, phylogenetic signal, and evolution. PeerJ 4:e1668.

Lele SR, Richtsmeier JT. 2001. An Invariant Approach to Statistical Analysis of Shape. Boca Raton: Chapman and Hall.

Examples

Run this code
library(cluster)

data(ligophorus_tpsdata)

#There are 11 landmarks for the ventral and dorsal anchors,
#yielding 110 pairwise Euclidean distances
#The indices for the pairwise Euclidean distances map to the upper triangle
#of the pairwise distance matrix by row
pwdist(ligophorus_tpsdata$bantingensis[[1]],average=FALSE)

Run the code above in your browser using DataLab