November 2017
Beginner to intermediate
366 pages
7h 59m
English
The shortest distance between two pairs of nodes is the path with the least amount of nodes in it. Let us see the shortest path between two nodes in our simple graph:
> shortest.paths(simple.graph, "alice") alice bob charlie david eli francisalice 0 1 2 3 1 2>
The shortest.paths method gives the shortest paths between our node alice and all the other nodes. The node david is far way from alice.
Read now
Unlock full access