Description Usage Arguments Examples
Find central point for list of lat/long coordinates
1 | get_centroid(lat, lng, coord.unit = c("degrees", "radians"))
|
lat |
A quoted string indicating what named value in the bounding box represents latitude. If NULL, will be inferred from bounding box names. |
lng |
A quoted string indicating what named value in the bounding box represents longitude. If NULL, will be inferred from bounding box names. |
coord.unit |
The unit latitude and longitude are stored in. |
1 2 3 4 5 | df <- data.frame(
lat = c(44.05771, 44.18475),
lng = c(-73.99212, -73.81515)
)
get_centroid(df$lat, df$lng)
|
lat lng
44.12126 -73.90373
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.