powered by
This function calculates the distance between two vectors.
calcDistance(x, y, type = "", method = "hamming")
Vectors of the same length that contain 1's and 0's.
The type of graph being used (adjmatrix or adjmatrixlt). See 'Details'
The distance metric to use, currently only "hamming" is supported.
A single number indicating the distance between the two input vectors.
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.
type = "adjMatrix"
type
data(braingraphs) dist <- calcDistance(braingraphs[,1], braingraphs[,2], "adjMatrix") dist
Run the code above in your browser using DataLab