dist.chi2 | R Documentation |
Computes the chi-squared distance between the rows of a data frame of factors.
dist.chi2(X)
X |
data frame. All variables should be factors. |
This function is adapted from chi2Dist
function in ExPosition
package.
A symmetrical matrix of distances
Nicolas Robette
data(Music)
d <- dist.chi2(Music[,1:5])
# a short piece of the distance matrix
d[1:3, 1:3]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.