nearest_point: Joins y to x and y based on their X and Y coordinates.

Description Usage Arguments Details Value

View source: R/nearest-point.R

Description

Joins x to y based on minimising the euclidean distance between their X and Y coordinates. As a result each row in x is assigned the closest row in y.

Usage

1
nearest_point(x, y, suffix = c(".x", ".y"))

Arguments

x

A data frame with the columns X and Y.

y

A data frame with the columns X and Y.

suffix

If there are non-joined duplicate variables in x and y, these suffixes will be added to the output to diambiguate them.

Details

Note the convert_proj function can be used to ensure the X and Y coordinates are in the same projection.

Value

The joined data frame with the additional column Distance indicating the distance between the X and Y coordinates.


sebdalgarno/HGfetch documentation built on May 29, 2019, 4:57 p.m.