Distances on Directed Graphs in R