powered by
x
y
hamming.distance
hamming.distance(x, y)
x <- c(1, 0, 0) y <- c(1, 0, 1) hamming.distance(x, y) z <- rbind(x,y) rownames(z) <- c("Fred", "Tom") hamming.distance(z) hamming.distance(1:3, 3:1)
Run the code above in your browser using DataLab