dist.chi2: Chi-squared distance

View source: R/dist.chi2.R

dist.chi2R Documentation

Chi-squared distance

Description

Computes the chi-squared distance between the rows of a data frame of factors.

Usage

dist.chi2(X)

Arguments

X

data frame. All variables should be factors.

Details

This function is adapted from chi2Dist function in ExPosition package.

Value

A symmetrical matrix of distances

Author(s)

Nicolas Robette

Examples

data(Music)
d <- dist.chi2(Music[,1:5])
# a short piece of the distance matrix
d[1:3, 1:3]

GDAtools documentation built on Oct. 6, 2023, 5:07 p.m.