Measures the nearest reference point (reference) distance for each input point (in).
Version | 1.1 |
---|---|
Bundle | tools |
Categories | Analysis |
Authors | Ville Rantanen (ville.rantanen@helsinki.fi) |
Issue tracker | View/Report issues |
Requires | R |
Source files | component.xml distances.r |
Usage | Example with default values |
Name | Type | Mandatory | Description |
---|---|---|---|
in | CSV | Mandatory | A CSV file with coordinate points |
reference | CSV | Mandatory | A CSV file with coordinates to find nearest match from. |
Name | Type | Description |
---|---|---|
out | CSV | Distances for each input point. Number of rows equals rows in in. "Points" refer to in port, and "Reference" to reference port. |
Name | Type | Default | Description |
---|---|---|---|
cols | string | "*" | Column names for distance measure. The same names must be present for both inputs. |
distance | string | "euclidean" | Distance calculation method to use. ('euclidean','manhattan','chebyshev','mahalanobis') |
inId | string | "" | Column name of the row identifier of points in in input (if exists). Also requires referenceIn parameter. If not defined, only coordinate pairs are returned. |
labelCol | string | "" | Column that defines a label column, if the points are from different data sets. The measurements are done only inside the rows with the same label. |
nth | float | 1 | Get Nth nearest distance. If the reference input is the same as the in, this must be set to 2, since the first nearest would be the point itself. |
referenceId | string | "" | Column name of the row identifier of points in reference input (if exists). |
Test case | Parameters▼ | IN in |
IN reference |
OUT out |
||
---|---|---|---|---|---|---|
case1 | properties | in | reference | out | ||
distance=euclidean, |
||||||
case2_single_file | properties | in | reference | out | ||
distance=euclidean, |
||||||
case3_labels | properties | in | reference | out | ||
distance=euclidean, |
||||||
case4_error_method | properties | in | reference | (expecting failure) | ||
distance=fmsdfsd, |
||||||
case5_manhattan | properties | in | reference | out | ||
distance=manhattan, |
||||||
case6_chebyshev | properties | in | reference | out | ||
distance=chebyshev, |
||||||
case7_mahalanobis | properties | in | reference | out | ||
distance=mahalanobis, |
||||||
case8_rowids | properties | in | reference | out | ||
distance=euclidean, |
||||||
case9_labels_rowids | properties | in | reference | out | ||
distance=euclidean, |