calcDistance: Calculate the Distance Between Vectors

Description Usage Arguments Details Value Author(s) Examples

View source: R/calcDistance.R

Description

This function calculates the distance between two vectors.

Usage

1
calcDistance(x, y, type = "", method = "hamming")

Arguments

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.

Details

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.

Value

A single number indicating the distance between the two input vectors.

Author(s)

Terrence Brooks, Berkley Shands, Skye Buckner-Petty, Patricio S. La Rosa, Elena Deych, William D. Shannon

Examples

1
2
3
4

bingat documentation built on May 1, 2019, 9:11 p.m.