add_euclidean: Add Euclidean distance

View source: R/distances.R

add_euclideanR Documentation

Add Euclidean distance

Description

Add a Euclidean distance measure to the end of a data frame

Usage

add_euclidean(df, x, y, .name = "eucd")

Arguments

df

A data.frame

x, y

The two values to compute the distance from

.name

The name of the new column for the distance value

Examples

add_euclidean(iris, Sepal.Width, Sepal.Length)
df <- head(iris)
df[1, ] <- NA_real_
add_euclidean(df, Sepal.Length, Sepal.Width)

jmbarbone/jordanExtra documentation built on Aug. 4, 2023, 5:37 p.m.