Description Usage Arguments Note Examples
Finds the nearest points between two data tables.
1 2 | dtNearestPoints(dt1, dt2, dt1Coords = NULL, dt2Coords = NULL,
dt2Id = NULL, distanceCalculation = c("haversine"))
|
dt1 |
|
dt2 |
|
dt1Coords |
vector containing the names of the columns of |
dt2Id |
string specifying the column of |
distanceCalculation |
distance measure |
dt1Coords |
vector containing the names of the columns of |
dt1
and dt2
get updated by reference within the function call, which modifies the original data.table
objects.
To avoid this behaviour you can use a data.table::copy()
of the objects as the arguments for dt1
and dt2
. See Examples
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.