closest_point_field | R Documentation |
Find the closest point of the FIELD grid to the specified position
closest_point_field(x, lat = NULL, closest = 1L, ...)
x |
vector of coordinates in the form longitude/latitude data frame |
lat |
alternatively, x and lat can be vector of the same length |
closest |
an integer to specify the number of point to output. |
... |
currently unused |
a list with two components: the closest point(s) of the grid and the distance (s).
# Ensure that data package is available before running the example.
# If it is not, see the `resourcecode` package vignette for details
# on installing the required data package.
if (requireNamespace("resourcecodedata", quietly = TRUE)) {
semrev_west <- closest_point_field(c(-2.786, 47.239))
semrev_west
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.