Learn R Programming

tiger (version 0.2.3.1)

eD: Euclidean Distance

Description

Calculate the euclidean distance for multiple vectors

Usage

eD(x, y)

Arguments

x
matrix with first set of vectors.
y
matrix with second set of vectors.

Value

vector with the euclidean distance for each pair

Details

x and y need the following structure to compare multiple vectors at once: rows contain the k vectors

columns the n coordinates in the n-space

str(x) == matrix [1:k, 1:n]

Examples

Run this code
eD(1:3, 2:4)

Run the code above in your browser using DataLab