Friends, I have a shapefile file with several points that are in geographic coordinates (Latitude and Longitude). I would like to use the leaflet package to find the shortest path between these points, but shown on a map that I think can be provided by that package. . It is possible?? If so, could you give me an example of how to do this.
{leaflet} package is good for displaying routes; it is not meant for calculating them. There are other tools for that, though you might struggle doing so in R
once you have a route prepared from elsewhere you can display it via {leaflet} package; addPolylines() should do the trick (but keep in mind this commnad is about displaying it on a map, no more, no less).