title: R calculating distance between 2 points on earth using package geosphere
body: <p>My question is based upon this <a href="https://stackoverflow.com/questions/32363998/function-to-calculate-geospatial-distance-between-two-points-lat-long-using-r">question</a>. Using it I wrote below code where first set of coordinates are for LGA airport NY while second set of coordinates are for EWR airport NY. I get the answer 33713. Is that in miles or in kilometers? A quick google check says that the distance should be 33 miles (but it is not a straigh line/arc distance :( It is a distance by road). The package <a href="https://cran.r-project.org/web/packages/geosphere/geosphere.pdf" rel="noreferrer">documentation</a> says that the answers are in meters. Please clarify. Is this a good method to find the distance on Earth given 2 coordinates? How can I get answer in Miles?</p>
  
  <pre><code>library(geosphere)
  distm (c(40.777250, -73.872610), c(40.6895, -74.1745), fun = distHaversine)
           [,1]
  [1,] 33713.61
  </code></pre>