Learn R Programming

henna (version 0.7.5)

dfEuclidean: Find the Euclidean distance between two points in a data frame

Description

This function finds the Euclidean distance between two points in a data frame.

Usage

dfEuclidean(df, i, j, pointCoords = c(1, 2), replaceZero = 0)

Value

A numeric value.

Arguments

df

A data frame containing the coordinates of the points.

i

Row name or index.

j

Row name or index

pointCoords

The row names or indices of point coordinates.

replaceZero

Value to replace zero with. If set to 0, no replacement will occur.