powered by
Calculate the distance between all samples in a list, and return as matrix.
distanceMatrix(X, distFun)
list of samples, where each list element is a suitable input for distFun
distFun
Distance function of type f(x,y)=r, where r is a scalar and x and y are elements whose distance is evaluated.
The distance matrix
# NOT RUN { x <- list(5:1,c(2,4,5,1,3),c(5,4,3,1,2), sample(5)) distanceMatrix(x,distancePermutationHamming) # }
Run the code above in your browser using DataLab