powered by
Computes the chi-squared distance between the rows of a data frame of factors.
dist.chi2(X)
A symmetrical matrix of distances
data frame. All variables should be factors.
Nicolas Robette
This function is adapted from chi2Dist function in ExPosition package.
chi2Dist
ExPosition
data(Music) d <- dist.chi2(Music[,1:5]) # a short piece of the distance matrix d[1:3, 1:3]
Run the code above in your browser using DataLab