distancematrix | R Documentation |
Function invoking discrete distance functions. Available distances: 'bhattacharyya', 'chisquare', 'cramerV', 'hamming' and 'hellinger'
distancematrix(X, d)
X |
Matrix where rows are the observations and columns are discrete features |
d |
Name of distance. Distances available: bhattacharyya, chisquare, cramerV, hamming and hellinger |
R distance object
X = rbind(matrix(paste0("a", rpois(7*5, 1)), nrow=5),
matrix(paste0("a", rpois(7*5, 3)), nrow=5))
distancematrix(X = X, d = "hellinger")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.