hamming.distance.RdIf both x and
y are vectors, hamming.distance returns the Hamming
distance (number of different elements) between this two vectors. If
x is a matrix, the Hamming distances between the rows of x
are computed and y is ignored.
hamming.distance(x, y)
| x | a vector or matrix. |
|---|---|
| y | an optional vector. |
#> [1] 1#> Fred Tom #> Fred 0 1 #> Tom 1 0hamming.distance(1:3, 3:1)#> [1] 2