R/locdist.R

Defines functions locdist

Documented in locdist

locdist <-
function(scale = "nmi", type = "p")
{
        lat <- geolocator(n = 2, type = type)
        x <- arcdist(lat$lat[1], lat$lon[1], lat$lat[2], lat$lon[2])
        if(scale == "km")
                x <- x * 1.852
        return(x)
}

Try the geo package in your browser

Any scripts or data that you put into this service are public.

geo documentation built on May 2, 2019, 5:22 p.m.