#e.g., used for distance between integer sequence
x <- c(0,1,10,2,4)
y <- c(10,1,0,4,-4)
distanceSequenceLevenshtein(x,y)
p <- replicate(10,sample(1:5,3,replace=TRUE),simplify=FALSE)
distanceMatrix(p,distanceSequenceLevenshtein)
Run the code above in your browser using DataLab