Description Usage Arguments Author(s) References Examples
View source: R/hamming_distance.R
Linear algebraic way to compute pairwise Hamming distances from a matrix. This is much faster than using double For loops.
1 |
X |
A matrix that contains real values |
Peter I-Fan Wu
https://johanndejong.wordpress.com/2015/09/23/fast-hamming-distance-in-r/
1 2 3 4 5 | mat=matrix(c(1,1,0,0,
1,0,1,1,
1,0,0,0
),nrow=3,byrow=T)
hamming_distance(mat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.