midpoint | R Documentation |
Calculate the midpoint given a list of locations denoted by latitude and longitude coordinates.
midpoint(lat, lon, w = rep(1, length(lat)))
lat, lon |
The location points |
w |
The weighted value for each point |
The geographic midpoint in lat/lon
http://www.geomidpoint.com/calculation.html
radius.of.gyration
lat <- c(30.2, 30, 30.5) lon <- c(120, 120.4, 120.5) # equal weight midpoint(lat, lon) # custom weight w <- c(1, 2, 1) midpoint(lat, lon, w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.