dist.chi2 {GDAtools} | R 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]
[Package GDAtools version 2.1 Index]