euclidean: Euclidean distance

View source: R/MPMutils.R

euclideanR Documentation

Euclidean distance

Description

Compute the euclidean distance between two vectors.

Usage

euclidean(x, y, ...)

Arguments

x

A numeric vector.

y

A numeric vector.

...

Currently ignored.

Value

A numeric value corresponding to the euclidean distrance.

Author(s)

Fernando Palluzzi fernando.palluzzi@gmail.com

See Also

similarity, jaccard

Examples


# Sample two random ultrasound profiles from the default dataset
x <- mosaic::sample(mpm.us, 1, replace = FALSE, prob = NULL)
x <- as.matrix(x[, 2:15])
y <- mosaic::sample(mpm.us, 1, replace = FALSE, prob = NULL)
y <- as.matrix(y[, 2:15])

# Compute the euclidean distance
d <- euclidean(x, y)
print(d)


Morphonodepredictivemodel/morphonode documentation built on Feb. 15, 2023, 4:51 a.m.