Description Usage Arguments Details Value Author(s) Examples
This function calculates the distance between two vectors.
1 | calcDistance(x, y, type = "", method = "hamming")
|
x, y |
Vectors of the same length that contain 1's and 0's. |
type |
The type of graph being used (adjmatrix or adjmatrixlt). See 'Details' |
method |
The distance metric to use, currently only "hamming" is supported. |
If the type = "adjMatrix"
is used, the value will be divided by 2 to account for duplicate comparisons.
Otherwise the type
does not affect the output.
A single number indicating the distance between the two input vectors.
Terrence Brooks, Berkley Shands, Skye Buckner-Petty, Patricio S. La Rosa, Elena Deych, William D. Shannon
1 2 3 4 | data(braingraphs)
dist <- calcDistance(braingraphs[,1], braingraphs[,2], "adjMatrix")
dist
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.