Find the closest point in the dataframe to a given point, and return the corresponding section and distance.

closest(e, df)

Arguments

e

A numeric vector representing the point coordinates.

df

A data frame containing the reference points.

Value

A numeric vector representing the section and distance.