Description Usage Arguments References

A simple distance calculator for two sets of geo coordinates. This function may be utilized to estimate the "straight line" distance between two sets of, e.g., Google Web Mercator/WGS 84 geocoordinates.

1 |

`long1` |
numeric; the longitude (degrees) of location 1. |

`lat1` |
numeric; the latitude (degrees) of location 1. |

`long2` |
numeric; the longitude (degrees) of location 2. |

`lat2` |
numeric; the latitude (degrees) of location 2. |

`units` |
character string; must be either "metric" (the default) or "imperial". Specifying "metric" will return the distance between location 1 and location in kilometers, whereas "imperial" returns the distance in miles. |

http://menugget.blogspot.com/2011/05/r-functions-for-earth-geographic_29.html

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.