phidistance: Calculating the pairwise phi distance matrix between n...

View source: R/phidist.R

phidistanceR Documentation

Calculating the pairwise phi distance matrix between n vectors

Description

The pairwise phi-distance of two vectors x and y is sqrt(sum(((x[i]-y[i])^2)/((x[i]+y[i])*(sum(x)+sum(y))))). The function calculates this for all pairs of rows of a matrix or data frame X.

Usage

phidistance(X)

Arguments

X

an n times p numeric matrix or data frame

Value

a symmetric n times n matrix of pairwise phi distance (between rows of X) with 0 in the main diagonal. Is an object of class distance and matrix.


cops documentation built on Feb. 2, 2024, 3:02 p.m.