R function which can find the shortest path from a given departure point and a given destination point based on a given sociomatrix