Skip to contents

Calculate Euclidean distance

Usage

euclidean(x, ...)

# S4 method for numeric
euclidean(x, y)

Arguments

x

Object.

y

Object.

...

Additional arguments.

Value

numeric.

Note

Updated 2023-09-11.

See also

  • https://www.statology.org/euclidean-distance-in-r/

Examples

## numeric ====
x <- seq(from = 1L, to = 5L, by = 1L)
y <- seq(from = 6L, to = 10L, by = 1L)
euclidean(x = x, y = y)
#> [1] 11.18034