powered by
Function invoking discrete distance functions. Available distances: 'bhattacharyya', 'chisquare', 'cramerV', 'hamming' and 'hellinger'
distancematrix(X, d)
R distance object
Matrix where rows are the observations and columns are discrete features
Name of distance. Distances available: bhattacharyya, chisquare, cramerV, hamming and hellinger
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")
Run the code above in your browser using DataLab