Learn R Programming

statisfactory (version 1.0.4)

euclid: Euclidean distance

Description

Euclidian distance in one or more dimensions.

Usage

euclid(a, b, na.rm = FALSE)

Value

Numeric.

Arguments

a

Numeric vector.

b

Numeric vector of same length as a.

na.rm

Logical. If TRUE, calculation ignores NA's in a and/or b.

Examples

Run this code

euclid(0, 5)
euclid(c(0, 0), c(1, 1))
euclid(c(0, 0, 0), c(1, 1, 1))

Run the code above in your browser using DataLab