I have an xlsx file which has 200 restaurants and 1 warehouse location with their coordinates in latitude and longitude. I want to calculate the distance from the warehouse to the restaurants using R. And rank them from shortes to longes in km. example table:
title: resturants with location
name latitude longitude
resturant1 23.646466 90.656566
resturant2 23.786464 90.254577
resturant3 23.586464 90.789646
resturant4 23.452166 90.656989
x
x
200..... .......... .........
table2: warehouse location
name latitude longitude
warehouse 23.654654 90.7854555
from the above table, I want to calculate the distance from the warehouse to the restaurants using R. And rank them from shorts to longes in km.