nsink_get_closest_lt | R Documentation |
This function will return the index of one vector that is closest and less than, by absolute values, to the values in another vector. If the value in v1 is less than all values in v2, then just the next closest is returned. Usually used to identify the closest lake or stream, in area or length respectively, to another lake or stream.
nsink_get_closest_lt(v1, v2)
v1 |
The first vector of values, likely length or area of a feature |
v2 |
The second vector of values, also likely length or area of a feature. |
Returns a vector, of length v1, of the index from v2 that is less than and closest in absolute value to each value in v1.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.