getDist | R Documentation |
Wrapper for raster::pointDistance that only requires input of a vector of longitudes and a vector of latitudes. Default calculation assumes data are in decimal degrees. If not, then set lonlat = FALSE. Compatible with tidyverse.
getDist(lon, lat, lonlat = TRUE)
lon |
Vector of longitudes |
lat |
Vector of latitudes |
lonlat |
If TRUE, coordinates should be in degrees; else they should represent planar ('Euclidean') space (e.g. units of meters) |
A vector of distances in meters.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.