distEuclid: Euclidean distance

Description Usage Arguments Details

Description

Returns the euclidean distance between two vector.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
distEuclid(x, ...)

## S3 method for class 'numeric'
distEuclid(x, y)

## S3 method for class 'matrix'
distEuclid(x, y)

## S3 method for class 'data.frame'
distEuclid(x, y)

Arguments

x, y

Points between which the distance is computed.

Details

if x is a vector or a matrix with one row, the funtion returns vector with the same number of observations as y corresponding to the distance with x. If x and y are both matrices of the same size, the function returns distance between each row.

@examples

x1 <- replicate(2,rnorm(5)) x2 <- replicate(2,rnorm(5))

distEuclid(x1[1,], x2) distEuclid(x1, x2)


martindurocher/floodRFA documentation built on June 5, 2019, 8:44 p.m.